layui/.eslintrc.js

67 lines
1.8 KiB
JavaScript
Raw Normal View History

// module.exports = {
// env: {
// browser: true,
// node: true,
// },
// parser: 'vue-eslint-parser',
// parserOptions: {
// parser: '@typescript-eslint/parser',
// sourceType: 'module',
// ecmaVersion: 10,
// },
// plugins: ['@typescript-eslint', 'prettier'],
// extends: [
// 'eslint:recommended',
// 'plugin:vue/vue3-recommended',
// 'plugin:@typescript-eslint/recommended',
// ],
// rules: {
// 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
// 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
// quotes: ['error', 'single'],
// semi: ['error', 'never'],
// 'no-unused-vars': 'off',
// '@typescript-eslint/no-unused-vars': 'off',
// },
// }
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',
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',
},
}