mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 10:25:52 +02:00
chore: migrate to ESlint v9
This commit is contained in:
parent
8c00292fa1
commit
4f25a0c670
142 changed files with 4387 additions and 2052 deletions
52
app/eslint.config.mjs
Normal file
52
app/eslint.config.mjs
Normal file
|
@ -0,0 +1,52 @@
|
|||
import createConfig from '@antfu/eslint-config'
|
||||
import sonarjs from 'eslint-plugin-sonarjs'
|
||||
|
||||
export default createConfig(
|
||||
{
|
||||
stylistic: true,
|
||||
ignores: ['**/version.json', 'tsconfig.json', 'tsconfig.node.json'],
|
||||
},
|
||||
sonarjs.configs.recommended,
|
||||
{
|
||||
name: '@nginx-ui/eslint-config',
|
||||
rules: {
|
||||
'no-console': 'warn',
|
||||
'no-alert': 'warn',
|
||||
'ts/no-explicit-any': 'warn',
|
||||
'vue/no-unused-refs': 'warn',
|
||||
'vue/prop-name-casing': 'warn',
|
||||
'node/prefer-global/process': 'off',
|
||||
'unused-imports/no-unused-vars': 'warn',
|
||||
|
||||
// https://eslint.org/docs/latest/rules/dot-notation
|
||||
'style/dot-notation': 'off',
|
||||
|
||||
// https://eslint.org/docs/latest/rules/arrow-parens
|
||||
'style/arrow-parens': ['error', 'as-needed'],
|
||||
|
||||
// https://eslint.org/docs/latest/rules/prefer-template
|
||||
'prefer-template': 'error',
|
||||
|
||||
// https://eslint.style/rules/js/arrow-spacing
|
||||
'style/arrow-spacing': ['error', { before: true, after: true }],
|
||||
|
||||
// https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/prefer-default-export.md
|
||||
'import/prefer-default-export': 'off',
|
||||
|
||||
// https://eslint.vuejs.org/rules/require-typed-ref
|
||||
'vue/require-typed-ref': 'warn',
|
||||
|
||||
// https://eslint.vuejs.org/rules/require-prop-types
|
||||
'vue/require-prop-types': 'warn',
|
||||
|
||||
// https://eslint.vuejs.org/rules/no-ref-as-operand.html
|
||||
'vue/no-ref-as-operand': 'error',
|
||||
|
||||
// -- Sonarlint
|
||||
'sonarjs/no-duplicate-string': 'off',
|
||||
'sonarjs/no-nested-template-literals': 'off',
|
||||
'sonarjs/pseudo-random': 'warn',
|
||||
'sonarjs/no-nested-functions': 'off',
|
||||
},
|
||||
},
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue