Browse Source

【配置】eslint:@ 识别

master
xiaosi 1 year ago
parent
commit
5974a289c6
  1. 6
      .eslintrc.cjs
  2. 20
      package-lock.json
  3. 1
      package.json

6
.eslintrc.cjs

@ -12,6 +12,12 @@ module.exports = {
ecmaVersion: 'latest',
},
settings: {
'import/resolver': {
alias: [['@', './src']],
},
},
rules: {
'no-console': 'warn',
'no-debugger': 'warn',

20
package-lock.json

@ -17,6 +17,7 @@
"@vitejs/plugin-vue-jsx": "^3.0.2",
"eslint": "^8.49.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-vue": "^9.17.0",
"vite": "^4.4.11"
}
@ -1860,6 +1861,18 @@
"eslint-plugin-import": "^2.25.2"
}
},
"node_modules/eslint-import-resolver-alias": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/eslint-import-resolver-alias/-/eslint-import-resolver-alias-1.1.2.tgz",
"integrity": "sha512-WdviM1Eu834zsfjHtcGHtGfcu+F30Od3V7I9Fi57uhBEwPkjDcii7/yW8jAT+gOhn4P/vOxxNAXbFAKsrrc15w==",
"dev": true,
"engines": {
"node": ">= 4"
},
"peerDependencies": {
"eslint-plugin-import": ">=1.4.0"
}
},
"node_modules/eslint-import-resolver-node": {
"version": "0.3.9",
"resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz",
@ -5474,6 +5487,13 @@
"semver": "^6.3.0"
}
},
"eslint-import-resolver-alias": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/eslint-import-resolver-alias/-/eslint-import-resolver-alias-1.1.2.tgz",
"integrity": "sha512-WdviM1Eu834zsfjHtcGHtGfcu+F30Od3V7I9Fi57uhBEwPkjDcii7/yW8jAT+gOhn4P/vOxxNAXbFAKsrrc15w==",
"dev": true,
"requires": {}
},
"eslint-import-resolver-node": {
"version": "0.3.9",
"resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz",

1
package.json

@ -18,6 +18,7 @@
"@vitejs/plugin-vue-jsx": "^3.0.2",
"eslint": "^8.49.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-vue": "^9.17.0",
"vite": "^4.4.11"
}

Loading…
Cancel
Save