2024-11-03 12:23:47 +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';
|
2024-11-17 13:43:41 +03:00
|
|
|
import pluginImport from 'eslint-plugin-import';
|
2024-11-03 12:23:47 +03:00
|
|
|
|
|
|
|
export default [
|
|
|
|
{ files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"] },
|
|
|
|
{ languageOptions: { globals: globals.browser } },
|
|
|
|
pluginJs.configs.recommended,
|
|
|
|
...tseslint.configs.recommended,
|
|
|
|
pluginReact.configs.flat.recommended,
|
|
|
|
{
|
|
|
|
plugins: {
|
2024-11-17 13:43:41 +03:00
|
|
|
'@stylistic': stylistic,
|
|
|
|
'import': pluginImport,
|
2024-11-03 12:23:47 +03:00
|
|
|
},
|
|
|
|
"rules": {
|
|
|
|
"no-unused-vars": "off",
|
|
|
|
"@typescript-eslint/no-unused-vars": [
|
|
|
|
"warn", // or "error"
|
|
|
|
{
|
|
|
|
"argsIgnorePattern": "^_",
|
|
|
|
"varsIgnorePattern": "^_",
|
|
|
|
"caughtErrorsIgnorePattern": "^_"
|
|
|
|
}
|
|
|
|
],
|
2024-11-17 13:43:41 +03:00
|
|
|
"sort-imports": ["off"],
|
|
|
|
"import/order": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
"groups": [
|
|
|
|
"builtin",
|
|
|
|
"external",
|
|
|
|
"internal",
|
|
|
|
"parent",
|
|
|
|
["sibling", "index"]
|
|
|
|
],
|
|
|
|
"newlines-between": "always",
|
|
|
|
}
|
|
|
|
],
|
2024-11-03 12:23:47 +03:00
|
|
|
semi: ["error", "always"],
|
|
|
|
'@stylistic/indent': ['error', 2],
|
|
|
|
'react/prop-types': 'off'
|
|
|
|
},
|
|
|
|
}
|
|
|
|
];
|