Skip to content

Commit 82dfaa1

Browse files
authored
Merge pull request #1 from dsb-norge/v1-x
Initial vue3 config
2 parents 318b54c + 4245f26 commit 82dfaa1

File tree

5 files changed

+612
-1300
lines changed

5 files changed

+612
-1300
lines changed

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @dsb-norge/dsb-developers

README.md

+13-11
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
1-
# eslint-config-dsb-vue
1+
# eslint-config-dsb-vue3
22

3-
[![npm version](https://badge.fury.io/js/%40dsb-norge%2Feslint-config-dsb-vue.svg)](https://badge.fury.io/js/%40dsb-norge%2Feslint-config-dsb-vue)
4-
[![GitHub license](https://img.shields.io/npm/l/@dsb-norge/eslint-config-dsb-vue)](https://github.com/dsb-norge/eslint-config-dsb-vue/blob/master/LICENSE.md)
3+
[![npm version](https://badge.fury.io/js/%40dsb-norge%2Feslint-config-dsb-vue3.svg)](https://badge.fury.io/js/%40dsb-norge%2Feslint-config-dsb-vue3)
4+
[![GitHub license](https://img.shields.io/npm/l/@dsb-norge/eslint-config-dsb-vue3)](https://github.com/dsb-norge/eslint-config-dsb-vue3/blob/master/LICENSE.md)
55

66
## Installation
77

8-
The default export contains the [recommended ruleset for Vue](https://eslint.vuejs.org/), and the ones listed in the [rules section](https://github.com/dsb-norge/eslint-config-dsb-vue/blob/master/index.js) .
8+
The default export contains all default [ESLint rules](https://github.com/standard/eslint-config-standard) for [JavaScript Standard Style](http://standardjs.com/) , including
9+
the [recommended ruleset for Vue](https://eslint.vuejs.org/), and the ones listed in the [rules section](https://github.com/dsb-norge/eslint-config-dsb-vue3/blob/master/index.js) .
910

1011
Note: It requires some peerDependencies as well.
1112

1213
Install the package with:
1314

1415
```sh
15-
npx install-peerdeps --dev @dsb-norge/eslint-config-dsb-vue
16+
npx install-peerdeps --dev @dsb-norge/eslint-config-dsb-vue3
1617
```
17-
18+
1819
Then install the correct versions of each peerDependency package, which are
1920
listed by the command:
2021

2122
```sh
22-
npm info "@dsb-norge/eslint-config-dsb-vue@latest" peerDependencies
23+
npm info "@dsb-norge/eslint-config-dsb-vue3@latest" peerDependencies
2324
```
2425

2526
## Usage
@@ -29,7 +30,7 @@ Now add the config to either your `package.json`:
2930
```json
3031
{
3132
"eslintConfig": {
32-
"extends": "@dsb-norge/dsb-vue"
33+
"extends": "@dsb-norge/dsb-vue3"
3334
}
3435
}
3536
```
@@ -38,24 +39,25 @@ or to your `.eslintrc`:
3839

3940
```json
4041
{
41-
"extends": "@dsb-norge/dsb-vue"
42+
"extends": "@dsb-norge/dsb-vue3"
4243
}
4344
```
4445

4546
or to your `.eslintrc.js`:
4647

4748
```js
4849
module.exports = {
49-
extends: '@dsb-norge/dsb-vue'
50+
extends: '@dsb-norge/dsb-vue3'
5051
}
5152
```
5253

5354
## Assumptions
5455

5556
This ESLint configuration comes with some fundamental assumptions:
5657

57-
- vue.js 3, vite, typescript and/or node environment
58+
- vue.js 3 and/or node environment
5859
- browser and/or node environment
60+
- vite
5961

6062
Despite some assumptions, [you can easily overwrite, extend and unset
6163
rules and any other setting in your custom eslint config](https://eslint.org/docs/user-guide/configuring).

index.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ module.exports = {
88
extends: [
99
'eslint:recommended',
1010
'plugin:vue/vue3-recommended',
11-
'@vue/typescript/recommended'
11+
'standard'
1212
],
1313
plugins: [
14-
'vue'
1514
],
1615
rules: {
1716
'no-console': process.env.NODE_ENV === 'production' ? ['error', { allow: ['error'] }] : 'warn',
@@ -31,9 +30,12 @@ module.exports = {
3130
'vue/space-infix-ops': 'error',
3231
'vue/space-unary-ops': 'error',
3332
'vue/v-on-function-call': 'error',
34-
'vue/no-empty-component-block': 'error'
33+
'vue/no-empty-component-block': 'error',
34+
'vue/multi-word-component-names': 'off'
3535
},
3636
parserOptions: {
37-
sourceType: 'module'
37+
requireConfigFile: false,
38+
sourceType: 'module',
39+
ecmaVersion: 2021
3840
}
3941
}

0 commit comments

Comments
 (0)