diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index ea2eebf..0000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,73 +0,0 @@ -module.exports = { - root: true, - parser: "@typescript-eslint/parser", - plugins: ["@typescript-eslint"], - extends: [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "plugin:markdown/recommended", - "plugin:import/recommended", - "plugin:import/typescript", - "prettier", - ], - env: { - browser: true, - node: false, - }, - ignorePatterns: ["browserstack-browsers.js", "web-test-runner.config.js"], - overrides: [ - { - files: ["*.ts", "*.tsx"], - parserOptions: { - tsconfigRootDir: __dirname, - project: ["./tsconfig.json", "test/tsconfig.json"], - }, - extends: [ - "plugin:@typescript-eslint/recommended-requiring-type-checking", - ], - rules: { - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-unsafe-member-access": "off", - "@typescript-eslint/no-unsafe-assignment": "off", - "@typescript-eslint/no-unsafe-call": "off", - "@typescript-eslint/no-unsafe-return": "off", - "@typescript-eslint/no-non-null-assertion": "off", - "@typescript-eslint/explicit-module-boundary-types": "off", - "@typescript-eslint/ban-types": "off", - "@typescript-eslint/no-unsafe-argument": "off", - "@typescript-eslint/no-redundant-type-constituents": "off", - }, - }, - { - files: ["test/unit/**/*.ts", "test/unit/*.tsx"], - env: { - browser: true, - node: true, - }, - }, - { - files: ["examples/**/*.js"], - rules: { - "@typescript-eslint/explicit-module-boundary-types": "off", - }, - }, - { - files: ["*.js"], - excludedFiles: ["examples/**"], - extends: ["plugin:node/recommended"], - env: { - node: true, - browser: false, - }, - rules: { - "@typescript-eslint/no-var-requires": "off", - }, - }, - ], - rules: { - "max-statements-per-line": "error", - "no-var": "error", - "import/newline-after-import": "error", - "import/no-default-export": "error", - }, -}; diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..e5c219b --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,69 @@ +{ + "root": true, + "parser": "@typescript-eslint/parser", + "plugins": ["@typescript-eslint"], + "ignorePatterns": ["build"], + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "plugin:markdown/recommended", + "plugin:import/recommended", + "plugin:import/typescript", + "prettier" + ], + "env": { + "browser": true, + "node": false + }, + "ignorePatterns": ["browserstack-browsers.js", "web-test-runner.config.js"], + "overrides": [{ + "files": ["*.ts", "*.tsx"], + "parserOptions": { + "project": ["./tsconfig.json", "test/tsconfig.json"] + }, + "extends": [ + "plugin:@typescript-eslint/recommended-requiring-type-checking" + ], + "rules": { + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-unsafe-member-access": "off", + "@typescript-eslint/no-unsafe-assignment": "off", + "@typescript-eslint/no-unsafe-call": "off", + "@typescript-eslint/no-unsafe-return": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/explicit-module-boundary-types": "off", + "@typescript-eslint/ban-types": "off", + "@typescript-eslint/no-unsafe-argument": "off", + "@typescript-eslint/no-redundant-type-constituents": "off" + } + }, { + "files": ["test/unit/**/*.ts", "test/unit/*.tsx"], + "env": { + "browser": true, + "node": true + } + }, { + "files": ["examples/**/*.js"], + "rules": { + "import/no-unresolved": "off", + "@typescript-eslint/explicit-module-boundary-types": "off" + } + }, { + "files": ["*.js"], + "excludedFiles": ["examples/**"], + "extends": ["plugin:node/recommended"], + "env": { + "node": true, + "browser": false + }, + "rules": { + "@typescript-eslint/no-var-requires": "off" + } + }], + "rules": { + "max-statements-per-line": "error", + "no-var": "error", + "import/newline-after-import": "error", + "import/no-default-export": "error" + } +}