layui/.eslintrc.js

41 lines
1.1 KiB
JavaScript
Raw Normal View History

2021-09-27 06:09:33 +08:00
module.exports = {
root: true,
2021-09-27 06:09:33 +08:00
env: {
browser: true,
es2021: true,
2021-09-27 06:09:33 +08:00
node: true,
},
globals: {
defineProps: 'readonly',
defineEmits: 'readonly',
defineExpose: 'readonly',
withDefaults: 'readonly',
},
2021-09-27 06:09:33 +08:00
parser: 'vue-eslint-parser',
plugins: ['@typescript-eslint', 'prettier'],
extends: [
'plugin:vue/vue3-recommended',
'eslint:recommended',
'@vue/typescript/recommended',
'@vue/prettier',
'@vue/prettier/@typescript-eslint',
],
2021-09-27 06:09:33 +08:00
parserOptions: {
parser: '@typescript-eslint/parser',
sourceType: 'module',
ecmaVersion: 10,
},
rules: {
'vue/valid-template-root': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'vue/one-component-per-file': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'vue/no-mutating-props': 'off',
2021-09-27 06:09:33 +08:00
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
},
}