mirror of
https://github.com/misenhower/splatoon2.ink.git
synced 2026-03-21 17:24:37 -05:00
Use separate eslint config file
Adapted from splatoon3.ink
This commit is contained in:
parent
eec92030aa
commit
95c072cb6e
56
.eslintrc.cjs
Normal file
56
.eslintrc.cjs
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
/* eslint-env node */
|
||||
// const createAliasSetting = require('@vue/eslint-config-airbnb/createAliasSetting');
|
||||
|
||||
module.exports = {
|
||||
'root': true,
|
||||
'extends': [
|
||||
'plugin:vue/vue3-recommended',
|
||||
'eslint:recommended',
|
||||
],
|
||||
'rules': {
|
||||
// ESLint
|
||||
'indent': ['warn', 2, { 'SwitchCase': 1 }],
|
||||
'comma-dangle': ['warn', 'always-multiline'],
|
||||
'no-unused-vars': ['warn', { 'args': 'none' }],
|
||||
'semi': 'warn',
|
||||
'quotes': ['warn' , 'single'],
|
||||
'object-curly-spacing': ['warn', 'always'],
|
||||
|
||||
// Vue
|
||||
'vue/multi-word-component-names': 'off',
|
||||
'vue/require-default-prop': 'off',
|
||||
'vue/max-attributes-per-line': ['warn', { singleline: { max: 4 } }],
|
||||
'vue/html-self-closing': ['warn', { html: { void: 'always' } }],
|
||||
},
|
||||
'globals': {
|
||||
'__dirname': 'readonly',
|
||||
'process': 'readonly',
|
||||
'require': 'readonly',
|
||||
'module': 'readonly',
|
||||
'Buffer': 'readonly',
|
||||
},
|
||||
'overrides': [
|
||||
{
|
||||
'files': ['src/**'],
|
||||
'rules': {
|
||||
'@dword-design/import-alias/prefer-alias': ['warn', { 'alias': {
|
||||
'@': './src',
|
||||
} }],
|
||||
},
|
||||
},
|
||||
],
|
||||
'env': {
|
||||
'vue/setup-compiler-macros': true,
|
||||
},
|
||||
'ignorePatterns': [
|
||||
'src/assets/i18n/index.mjs', // "assert" syntax is currently unrecognized
|
||||
],
|
||||
'parserOptions': {
|
||||
'ecmaVersion': 2022,
|
||||
},
|
||||
settings: {
|
||||
// ...createAliasSetting({
|
||||
// '@': './src',
|
||||
// }),
|
||||
},
|
||||
};
|
||||
18
package.json
18
package.json
|
|
@ -62,24 +62,6 @@
|
|||
"shipit-cli": "^5.3.0",
|
||||
"vue-template-compiler": "^2.6.11"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
"env": {
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"plugin:vue/essential",
|
||||
"eslint:recommended"
|
||||
],
|
||||
"rules": {
|
||||
"no-unused-vars": "warn",
|
||||
"no-prototype-builtins": 0,
|
||||
"@vue/multi-word-component-names": 0
|
||||
},
|
||||
"parserOptions": {
|
||||
"parser": "babel-eslint"
|
||||
}
|
||||
},
|
||||
"postcss": {
|
||||
"plugins": {
|
||||
"autoprefixer": {}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user