Skip to content

Commit

Permalink
File format.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaddox5 committed Nov 15, 2024
1 parent 1afb026 commit 0acf130
Showing 1 changed file with 60 additions and 48 deletions.
108 changes: 60 additions & 48 deletions assets/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,75 +11,87 @@ import { FlatCompat } from "@eslint/eslintrc";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [{
export default [
{
ignores: [
"**/webpack.config.js",
"**/.eslintrc.js",
"**/socket.js",
"**/node_modules",
"**/coverage",
"**/webpack.config.js",
"**/.eslintrc.js",
"**/socket.js",
"**/node_modules",
"**/coverage",
],
}, ...fixupConfigRules(compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:jsx-a11y/recommended",
"plugin:react-hooks/recommended",
)), {
},
...fixupConfigRules(
compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:jsx-a11y/recommended",
"plugin:react-hooks/recommended",
),
),
{
plugins: {
"@typescript-eslint": fixupPluginRules(typescriptEslint),
react: fixupPluginRules(react),
"jsx-a11y": fixupPluginRules(jsxA11Y),
"@typescript-eslint": fixupPluginRules(typescriptEslint),
react: fixupPluginRules(react),
"jsx-a11y": fixupPluginRules(jsxA11Y),
},

linterOptions: {
reportUnusedDisableDirectives: true,
reportUnusedDisableDirectives: true,
},

languageOptions: {
parser: tsParser,
ecmaVersion: 5,
sourceType: "script",
parser: tsParser,
ecmaVersion: 5,
sourceType: "script",

parserOptions: {
ecmaFeatures: {
jsx: true,
},
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
},

settings: {
react: {
version: "detect",
},
react: {
version: "detect",
},
},

rules: {
"no-console": 0,
"prefer-rest-params": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-explicit-any": "off",
"no-console": 0,
"prefer-rest-params": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-explicit-any": "off",

"@typescript-eslint/no-unused-vars": ["error", {
argsIgnorePattern: "^_.*",
varsIgnorePattern: "^_.*",
destructuredArrayIgnorePattern: "^_.*",
}],
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_.*",
varsIgnorePattern: "^_.*",
destructuredArrayIgnorePattern: "^_.*",
},
],

"react/display-name": "off",
"react/display-name": "off",

"react/function-component-definition": ["error", {
namedComponents: "arrow-function",
unnamedComponents: "arrow-function",
}],
"react/function-component-definition": [
"error",
{
namedComponents: "arrow-function",
unnamedComponents: "arrow-function",
},
],

"react/no-danger": "error",
"jsx-a11y/no-static-element-interactions": "off",
"jsx-a11y/click-events-have-key-events": "off",
"react/no-danger": "error",
"jsx-a11y/no-static-element-interactions": "off",
"jsx-a11y/click-events-have-key-events": "off",
},
}];
},
];

0 comments on commit 0acf130

Please sign in to comment.