🎉 初始化项目
This commit is contained in:
54
web-app/tests/.eslintrc.cjs
Normal file
54
web-app/tests/.eslintrc.cjs
Normal file
@@ -0,0 +1,54 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
plugins: [
|
||||
'jest',
|
||||
'playwright',
|
||||
],
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:jest/recommended',
|
||||
'plugin:playwright/recommended',
|
||||
],
|
||||
env: {
|
||||
es6: true,
|
||||
node: true,
|
||||
'jest/globals': true,
|
||||
},
|
||||
parserOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
sourceType: 'module',
|
||||
},
|
||||
overrides: [
|
||||
],
|
||||
ignorePatterns: [
|
||||
'*.min.js',
|
||||
'node_modules/**/*',
|
||||
],
|
||||
globals: {
|
||||
},
|
||||
rules: {
|
||||
'no-unused-vars': ['error', { args: 'none' }],
|
||||
'no-control-regex': 'off',
|
||||
'no-constant-condition': ['error', { checkLoops: false }],
|
||||
'require-yield': 'off',
|
||||
'quotes': ['error', 'single'],
|
||||
'semi': ['error', 'always'],
|
||||
'indent': ['error', 4, { SwitchCase: 1, FunctionDeclaration: { parameters: 'first' } }],
|
||||
'comma-dangle': ['error', 'always-multiline'],
|
||||
'eol-last': ['error', 'always'],
|
||||
'no-trailing-spaces': 'error',
|
||||
'object-curly-spacing': ['error', 'always'],
|
||||
'space-infix-ops': 'error',
|
||||
'no-unused-expressions': ['error', { allowShortCircuit: true, allowTernary: true }],
|
||||
'no-cond-assign': 'error',
|
||||
|
||||
// These rules should eventually be enabled.
|
||||
'no-async-promise-executor': 'off',
|
||||
'no-inner-declarations': 'off',
|
||||
},
|
||||
settings: {
|
||||
jest: {
|
||||
version: 29,
|
||||
},
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user