-
Notifications
You must be signed in to change notification settings - Fork 454
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #650 from 0xJacky/chore/eslint9
chore: migrate to ESlint v9
- Loading branch information
Showing
142 changed files
with
6,402 additions
and
4,067 deletions.
There are no files selected for viewing
Empty file.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
declare module '*.svg' { | ||
import React from 'react' | ||
import type React from 'react' | ||
|
||
const content: React.FC<React.SVGProps<SVGElement>> | ||
export default content | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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', | ||
}, | ||
}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.