vue config
This commit is contained in:
parent
64c85ab0a0
commit
99536fb497
@ -13,7 +13,7 @@ to install this module you have to add the following line to your .npmrc
|
||||
then install the module and eslint
|
||||
|
||||
```sh
|
||||
npm i --save-dev @scode/eslint-es6 eslint
|
||||
npm i --save-dev @scode/eslint-vue eslint
|
||||
```
|
||||
|
||||
then create a file named .eslintrc.js with the following contents.
|
||||
@ -28,7 +28,7 @@ module.exports = {
|
||||
node: true
|
||||
},
|
||||
extends: [
|
||||
'@scode/eslint-es6'
|
||||
'@scode/eslint-vue'
|
||||
]
|
||||
}
|
||||
```
|
||||
|
45
index.js
45
index.js
@ -9,48 +9,23 @@ module.exports = {
|
||||
|
||||
globals: {},
|
||||
|
||||
parser: 'babel-eslint',
|
||||
parser: 'vue-eslint-parser',
|
||||
|
||||
extends: [
|
||||
'@scode',
|
||||
'@scode/eslint-es6',
|
||||
'plugin:vue/recommended'
|
||||
],
|
||||
|
||||
plugins: [
|
||||
'eslint-plugin-import',
|
||||
'eslint-plugin-vue'
|
||||
],
|
||||
|
||||
parserOptions: {
|
||||
sourceType: 'module',
|
||||
parser: 'babel-eslint'
|
||||
},
|
||||
|
||||
rules: {
|
||||
'import/no-unresolved': 'error',
|
||||
'import/named': 'error',
|
||||
'import/default': 'error',
|
||||
'import/namespace': 'error',
|
||||
'import/no-absolute-path': 'error',
|
||||
'import/no-dynamic-require': 'warn',
|
||||
'import/no-webpack-loader-syntax': 'error',
|
||||
'import/no-self-import': 'error',
|
||||
'import/no-cycle': 'error',
|
||||
'import/no-useless-path-segments': 'error',
|
||||
'import/no-unused-modules': 'error',
|
||||
'import/export': 'error',
|
||||
'import/no-named-as-default': 'error',
|
||||
'import/no-named-as-default-member': 'error',
|
||||
'import/no-deprecated': 'error',
|
||||
'import/no-extraneous-dependencies': 'error',
|
||||
'import/no-mutable-exports': 'error',
|
||||
'import/unambiguous': 'error',
|
||||
'import/no-commonjs': 'error',
|
||||
'import/no-amd': 'error',
|
||||
'import/first': 'error',
|
||||
'import/exports-last': 'error',
|
||||
'import/no-duplicates': 'error',
|
||||
'import/no-namespace': 'error',
|
||||
'import/extensions': 'error',
|
||||
'import/order': 'error',
|
||||
'import/newline-after-import': 'error',
|
||||
'import/prefer-default-export': 'error',
|
||||
'import/no-unassigned-import': 'error',
|
||||
'import/no-named-default': 'error',
|
||||
'import/no-anonymous-default-export': 'error',
|
||||
'import/group-exports': 'error'
|
||||
'vue/prop-name-casing': ['error', 'snake_case']
|
||||
}
|
||||
}
|
||||
|
10
package.json
10
package.json
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@scode/eslint-es6",
|
||||
"name": "@scode/eslint-vue",
|
||||
"version": "1.0.0",
|
||||
"description": "scode eslint es6 configuration",
|
||||
"description": "scode eslint vue configuration",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"lint": "eslint .",
|
||||
@ -10,7 +10,7 @@
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://git.scode.ovh/timo/eslint-es6.git"
|
||||
"url": "https://git.scode.ovh/timo/eslint-vue.git"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": ">=6.8.0"
|
||||
@ -24,10 +24,12 @@
|
||||
"devDependencies": {
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-config-standard": "^14.1.0",
|
||||
"eslint-plugin-import": "^2.20.2",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-promise": "^4.2.1",
|
||||
"eslint-plugin-standard": "^4.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"eslint-plugin-import": "^2.20.1"
|
||||
"@scode/eslint-es6": "^1.0.1"
|
||||
}
|
||||
}
|
||||
|
46
yarn.lock
46
yarn.lock
@ -23,6 +23,25 @@
|
||||
chalk "^2.0.0"
|
||||
js-tokens "^4.0.0"
|
||||
|
||||
"@scode/eslint-config@^2.0.1":
|
||||
version "2.0.1"
|
||||
resolved "https://npm.scode.ovh/@scode%2feslint-config/-/eslint-config-2.0.1.tgz#e45dc52938b41479b86531e00c77bd8463f77f44"
|
||||
integrity sha512-d7Ee/RG/PsYkulJ8dvnCHeqmaesRrLpeZGTGK6yt0qIu9sfynJ7Qm9bOb3B5OwRsUKR1uYHpGLszLmcO6rzyQQ==
|
||||
dependencies:
|
||||
eslint-plugin-import "^2.20.2"
|
||||
eslint-plugin-jsdoc "22"
|
||||
eslint-plugin-node "^11.0.0"
|
||||
eslint-plugin-sort-requires-by-path "^1.0.2"
|
||||
|
||||
"@scode/eslint-es6@^1.0.1":
|
||||
version "1.0.1"
|
||||
resolved "https://npm.scode.ovh/@scode%2feslint-es6/-/eslint-es6-1.0.1.tgz#b545c5515be959338bd427a1e8f160e8fe772f71"
|
||||
integrity sha512-1l47yiVR2zzNiQ/9zTZMcYBU9bpcjmh/QggTNMO7b0hq/aHmST6Bw4u6aZhBpu9ZmLc+Fq2gtSfabfmIYajtMA==
|
||||
dependencies:
|
||||
"@scode/eslint-config" "^2.0.1"
|
||||
eslint-plugin-import "^2.20.1"
|
||||
eslint-plugin-node "^11.1.0"
|
||||
|
||||
"@types/color-name@^1.1.1":
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0"
|
||||
@ -329,7 +348,7 @@ eslint-plugin-es@^3.0.0:
|
||||
eslint-utils "^2.0.0"
|
||||
regexpp "^3.0.0"
|
||||
|
||||
eslint-plugin-import@^2.20.1:
|
||||
eslint-plugin-import@^2.20.1, eslint-plugin-import@^2.20.2:
|
||||
version "2.20.2"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.20.2.tgz#91fc3807ce08be4837141272c8b99073906e588d"
|
||||
integrity sha512-FObidqpXrR8OnCh4iNsxy+WACztJLXAHBO5hK79T1Hc77PgQZkyDGA5Ag9xAvRpglvLNxhH/zSmZ70/pZ31dHg==
|
||||
@ -360,7 +379,7 @@ eslint-plugin-jsdoc@22:
|
||||
semver "^6.3.0"
|
||||
spdx-expression-parse "^3.0.0"
|
||||
|
||||
eslint-plugin-node@^11.0.0:
|
||||
eslint-plugin-node@^11.0.0, eslint-plugin-node@^11.1.0:
|
||||
version "11.1.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d"
|
||||
integrity sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==
|
||||
@ -387,15 +406,6 @@ eslint-plugin-standard@^4.0.1:
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-4.0.1.tgz#ff0519f7ffaff114f76d1bd7c3996eef0f6e20b4"
|
||||
integrity sha512-v/KBnfyaOMPmZc/dmc6ozOdWqekGp7bBGq4jLAecEfPGmfKiWS4sA8sC0LqiV9w5qmXAtXVn4M3p1jSyhY85SQ==
|
||||
|
||||
eslint-plugin-vue@^6.1.2:
|
||||
version "6.2.2"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-6.2.2.tgz#27fecd9a3a24789b0f111ecdd540a9e56198e0fe"
|
||||
integrity sha512-Nhc+oVAHm0uz/PkJAWscwIT4ijTrK5fqNqz9QB1D35SbbuMG1uB6Yr5AJpvPSWg+WOw7nYNswerYh0kOk64gqQ==
|
||||
dependencies:
|
||||
natural-compare "^1.4.0"
|
||||
semver "^5.6.0"
|
||||
vue-eslint-parser "^7.0.0"
|
||||
|
||||
eslint-scope@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9"
|
||||
@ -1118,7 +1128,7 @@ rxjs@^6.5.3:
|
||||
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
|
||||
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
|
||||
|
||||
"semver@2 || 3 || 4 || 5", semver@^5.5.0, semver@^5.6.0:
|
||||
"semver@2 || 3 || 4 || 5", semver@^5.5.0:
|
||||
version "5.7.1"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
|
||||
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
|
||||
@ -1326,18 +1336,6 @@ validate-npm-package-license@^3.0.1:
|
||||
spdx-correct "^3.0.0"
|
||||
spdx-expression-parse "^3.0.0"
|
||||
|
||||
vue-eslint-parser@^7.0.0:
|
||||
version "7.0.0"
|
||||
resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-7.0.0.tgz#a4ed2669f87179dedd06afdd8736acbb3a3864d6"
|
||||
integrity sha512-yR0dLxsTT7JfD2YQo9BhnQ6bUTLsZouuzt9SKRP7XNaZJV459gvlsJo4vT2nhZ/2dH9j3c53bIx9dnqU2prM9g==
|
||||
dependencies:
|
||||
debug "^4.1.1"
|
||||
eslint-scope "^5.0.0"
|
||||
eslint-visitor-keys "^1.1.0"
|
||||
espree "^6.1.2"
|
||||
esquery "^1.0.1"
|
||||
lodash "^4.17.15"
|
||||
|
||||
which@^1.2.9:
|
||||
version "1.3.1"
|
||||
resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
|
||||
|
Loading…
x
Reference in New Issue
Block a user