2024-10-22 21:29:29 +03:00
|
|
|
import globals from "globals"
|
|
|
|
import pluginJs from "@eslint/js"
|
|
|
|
import tseslint from "typescript-eslint"
|
|
|
|
import pluginReact from "eslint-plugin-react"
|
|
|
|
import stylistic from '@stylistic/eslint-plugin'
|
|
|
|
|
|
|
|
export default [
|
|
|
|
{ files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"] },
|
|
|
|
{ languageOptions: { globals: globals.browser } },
|
|
|
|
pluginJs.configs.recommended,
|
|
|
|
...tseslint.configs.recommended,
|
|
|
|
pluginReact.configs.flat.recommended,
|
|
|
|
{
|
|
|
|
plugins: {
|
|
|
|
'@stylistic': stylistic
|
|
|
|
},
|
|
|
|
"rules": {
|
|
|
|
"no-unused-vars": "off",
|
2024-11-04 11:31:59 +03:00
|
|
|
"react/prop-types": "off",
|
2024-10-22 21:29:29 +03:00
|
|
|
"@typescript-eslint/no-unused-vars": [
|
|
|
|
"warn", // or "error"
|
|
|
|
{
|
|
|
|
"argsIgnorePattern": "^_",
|
|
|
|
"varsIgnorePattern": "^_",
|
|
|
|
"caughtErrorsIgnorePattern": "^_"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"sort-imports": ["error", {
|
|
|
|
"ignoreCase": false,
|
|
|
|
"ignoreDeclarationSort": true,
|
|
|
|
"ignoreMemberSort": false,
|
|
|
|
"memberSyntaxSortOrder": ["none", "all", "multiple", "single"],
|
|
|
|
"allowSeparatedGroups": true
|
|
|
|
}],
|
|
|
|
semi: ["error", "never"],
|
|
|
|
'@stylistic/indent': ['error', 2],
|
|
|
|
},
|
|
|
|
}
|
|
|
|
]
|