mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-11-30 18:07:53 +01:00
linter setup
This commit is contained in:
1 parent
896373d998
commit
0fbd7cf506
5 files changed
+1979
-31
No files matched your search
+9
-14
@@ -1,28 +1,23 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
|
|
||||||
env: {
|
env: {
|
||||||
browser: true,
|
node: true,
|
||||||
node: true,
|
browser: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
parser: '@babel/eslint-parser',
|
parser: 'babel-eslint',
|
||||||
requireConfigFile: false,
|
|
||||||
ecmaVersion: 2020
|
|
||||||
},
|
},
|
||||||
extends: [
|
extends: [
|
||||||
'plugin:vue/essential',
|
'prettier/vue',
|
||||||
'plugin:nuxt/recommended',
|
'eslint:recommended',
|
||||||
|
'plugin:vue/recommended',
|
||||||
'plugin:prettier/recommended',
|
'plugin:prettier/recommended',
|
||||||
'eslint:recommended', //
|
|
||||||
'@vue/prettier',
|
|
||||||
'prettier',
|
|
||||||
'@nuxtjs',
|
|
||||||
],
|
],
|
||||||
|
plugins: ['vue'],
|
||||||
rules: {
|
rules: {
|
||||||
|
// semi: [2, 'never'],
|
||||||
|
// 'prettier/prettier': ['error', { semi: false }],
|
||||||
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
+6
-4
@@ -29,10 +29,12 @@ For detailed explanation on how things work, check out the [documentation](https
|
|||||||
|
|
||||||
>`Ctrl(Cmd)` + `Shift` + `P` > Open Settings (JSON)
|
>`Ctrl(Cmd)` + `Shift` + `P` > Open Settings (JSON)
|
||||||
```
|
```
|
||||||
"[vue]": {
|
"editor.formatOnSave": false,
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
"eslint.autoFixOnSave": true,
|
||||||
},
|
"eslint.options: {
|
||||||
"editor.formatOnSave": true,
|
"extensions": [ ".js", ".vue" ]
|
||||||
|
}
|
||||||
|
"vetur.validation.template": false,
|
||||||
```
|
```
|
||||||
|
|
||||||
## Special Directories
|
## Special Directories
|
||||||
|
|||||||
+13
-1
@@ -51,6 +51,18 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
build: {}
|
build: {
|
||||||
|
extend (config, ctx) {
|
||||||
|
// Run ESLint on save (dev-only)
|
||||||
|
if (ctx.isDev && ctx.isClient) {
|
||||||
|
config.module.rules.push({
|
||||||
|
enforce: 'pre',
|
||||||
|
test: /\.(js|vue)$/,
|
||||||
|
loader: 'eslint-loader',
|
||||||
|
exclude: /(node_modules)/
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Generated
+1940
-9
File diff suppressed because it is too large.
Load diff
+11
-3
@@ -6,7 +6,8 @@
|
|||||||
"dev": "nuxt",
|
"dev": "nuxt",
|
||||||
"build": "nuxt build",
|
"build": "nuxt build",
|
||||||
"start": "nuxt start",
|
"start": "nuxt start",
|
||||||
"generate": "nuxt generate"
|
"generate": "nuxt generate",
|
||||||
|
"lint": "eslint --fix --ext .js,.vue --ignore-path .gitignore ."
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"core-js": "^3.15.1",
|
"core-js": "^3.15.1",
|
||||||
@@ -14,6 +15,13 @@
|
|||||||
"vuetify": "^2.5.5"
|
"vuetify": "^2.5.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@nuxtjs/vuetify": "^1.12.1"
|
"@nuxtjs/vuetify": "^1.12.1",
|
||||||
|
"babel-eslint": "^10.1.0",
|
||||||
|
"eslint": "^7.32.0",
|
||||||
|
"eslint-config-prettier": "^8.3.0",
|
||||||
|
"eslint-loader": "^4.0.2",
|
||||||
|
"eslint-plugin-prettier": "^4.0.0",
|
||||||
|
"eslint-plugin-vue": "^8.2.0",
|
||||||
|
"prettier": "^2.5.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user