diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 825c5fe69..000000000 --- a/.eslintrc.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "env": { - "browser": true, - "es2021": true, - "node": true, - "jest": true - }, - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "prettier" - ], - "overrides": [], - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "plugins": [ - "@typescript-eslint", - "simple-import-sort", - "unused-imports" - ], - "rules": { - "indent": [ - "error", - 2 - ], - "quotes": [ - "error", - "single", - { - "avoidEscape": true, - "allowTemplateLiterals": true - } - ], - "quote-props": [ - "error", - "as-needed" - ], - "semi": [ - "error", - "always" - ], - "comma-dangle": [ - "error", - "never" - ], - "simple-import-sort/imports": 1, - "simple-import-sort/exports": 1, - "unused-imports/no-unused-imports": 1, - "@typescript-eslint/no-unused-vars": [ - 1, - { - "argsIgnorePattern": "React|res|next|^_" - } - ], - "@typescript-eslint/no-explicit-any": 0, - "@typescript-eslint/no-var-requires": 0, - "no-console": 0, - "@typescript-eslint/ban-ts-comment": 0, - "prefer-const": 0, - "no-case-declarations": 0, - "no-implicit-globals": 0, - "@typescript-eslint/no-unsafe-declaration-merging": 0 - } -} diff --git a/.prettierrc.json b/.prettierrc.json index db6adc6e0..c06cd1fd0 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,8 +1,6 @@ { - "trailingComma": "es5", - "tabWidth": 2, + "printWidth": 80, "semi": true, - "useTabs": false, "singleQuote": true, - "jsxSingleQuote": false -} \ No newline at end of file + "trailingComma": "all" +} diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 000000000..da73072fd --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,31 @@ +const tseslint = require('@typescript-eslint/eslint-plugin'); +const tsparser = require('@typescript-eslint/parser'); +const simpleImportSort = require('eslint-plugin-simple-import-sort'); +const prettierConfig = require('eslint-config-prettier'); + +module.exports = [ + { + ignores: ['**/node_modules/**', '**/dist/**', '**/build/**', '**/coverage/**'], + }, + { + files: ['**/*.ts', '**/*.tsx'], + languageOptions: { + parser: tsparser, + parserOptions: { + ecmaVersion: 'latest', + sourceType: 'module', + }, + }, + plugins: { + '@typescript-eslint': tseslint, + 'simple-import-sort': simpleImportSort, + }, + rules: { + ...tseslint.configs.recommended.rules, + 'simple-import-sort/imports': 'error', + 'simple-import-sort/exports': 'error', + 'no-undef': 'off', + }, + }, + prettierConfig, +];