1 Star 1 Fork 1

涂志伟/Vite + eslint husky perttier

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
.eslintrc.js 3.18 KB
一键复制 编辑 原始数据 按行查看 历史
module.exports = {
root: true,
env: {
browser: true, // browser global variables
// adds all ECMAScript 2021 globals and automatically sets the ecmaVersion parser option to 12.
es2021: true
},
extends: [
'plugin:vue/vue3-recommended',
'airbnb-base',
'plugin:prettier/recommended'
],
plugins: ['@typescript-eslint', 'prettier'],
parserOptions: {
ecmaVersion: 12,
parser: '@typescript-eslint/parser'
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx']
}
}
},
rules: {
'prettier/prettier': 'error',
'linebreak-style': 0,
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: [
'test/**', // tape, common npm pattern
'tests/**', // also common npm pattern
'spec/**', // mocha, rspec-like pattern
'**/__tests__/**', // jest pattern
'**/__mocks__/**', // jest pattern
'test.{js,jsx}', // repos with a single test file
'test-*.{js,jsx}', // repos with multiple top-level test files
'**/*{.,_}{test,spec}.{js,jsx}', // tests where the extension or filename suffix denotes that it is a test
'**/jest.config.js', // jest config
'**/webpack.config.js', // webpack config
'**/webpack.config.*.js', // webpack config
'**/rollup.config.js', // rollup config
'**/rollup.config.*.js', // rollup config
'**/gulpfile.js', // gulp config
'**/gulpfile.*.js', // gulp config
'**/Gruntfile{,.js}', // grunt config
'**/protractor.conf.js', // protractor config
'**/protractor.conf.*.js', // protractor config
'**vite**',
'**@vitejs**'
],
optionalDependencies: false
}
],
'no-param-reassign': [
'error',
{
props: true,
ignorePropertyModificationsFor: [
'acc', // for reduce accumulators
'accumulator', // for reduce accumulators
'e', // for e.returnvalue
'ctx', // for Koa routing
'context', // for Koa routing
'req', // for Express requests
'request', // for Express requests
'res', // for Express responses
'staticContext', // for ReactRouter context
'state', // for vuex state
'app'
]
}
],
'func-names': ['error', { props: false }],
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
mjs: 'never',
jsx: 'never',
ts: 'never'
}
],
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'vue/valid-v-slot': [
'error',
{
allowModifiers: true
}
],
'@typescript-eslint/no-non-null-assertion': 'off',
'no-irregular-whitespace': 'off',
'vue/no-mutating-props': 'off',
'import/no-unresolved': 'off',
'import/prefer-default-export': 'off'
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/tu_zhiwei98/vite---eslint-husky-perttier.git
git@gitee.com:tu_zhiwei98/vite---eslint-husky-perttier.git
tu_zhiwei98
vite---eslint-husky-perttier
Vite + eslint husky perttier
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385