mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-10-28 07:40:27 +01:00
linter setup
This commit is contained in:
+9
-14
@@ -1,28 +1,23 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
|
||||
env: {
|
||||
browser: true,
|
||||
node: true,
|
||||
node: true,
|
||||
browser: true,
|
||||
},
|
||||
|
||||
parserOptions: {
|
||||
parser: '@babel/eslint-parser',
|
||||
requireConfigFile: false,
|
||||
ecmaVersion: 2020
|
||||
parser: 'babel-eslint',
|
||||
},
|
||||
extends: [
|
||||
'plugin:vue/essential',
|
||||
'plugin:nuxt/recommended',
|
||||
'prettier/vue',
|
||||
'eslint:recommended',
|
||||
'plugin:vue/recommended',
|
||||
'plugin:prettier/recommended',
|
||||
'eslint:recommended', //
|
||||
'@vue/prettier',
|
||||
'prettier',
|
||||
'@nuxtjs',
|
||||
],
|
||||
plugins: ['vue'],
|
||||
rules: {
|
||||
// semi: [2, 'never'],
|
||||
// 'prettier/prettier': ['error', { semi: false }],
|
||||
'no-console': 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)
|
||||
```
|
||||
"[vue]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"editor.formatOnSave": true,
|
||||
"editor.formatOnSave": false,
|
||||
"eslint.autoFixOnSave": true,
|
||||
"eslint.options: {
|
||||
"extensions": [ ".js", ".vue" ]
|
||||
}
|
||||
"vetur.validation.template": false,
|
||||
```
|
||||
|
||||
## 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",
|
||||
"build": "nuxt build",
|
||||
"start": "nuxt start",
|
||||
"generate": "nuxt generate"
|
||||
"generate": "nuxt generate",
|
||||
"lint": "eslint --fix --ext .js,.vue --ignore-path .gitignore ."
|
||||
},
|
||||
"dependencies": {
|
||||
"core-js": "^3.15.1",
|
||||
@@ -14,6 +15,13 @@
|
||||
"vuetify": "^2.5.5"
|
||||
},
|
||||
"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