diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 0000000..cea20a1 --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,16 @@ +module.exports = { + extends: ['@bjerk/eslint-config', 'plugin:jest/recommended'], + plugins: ['jest'], + overrides: [ + { + files: 'jest.config.*', + rules: { + 'import/no-default-export': 'off', + }, + }, + ], + parserOptions: { + project: true, + tsconfigRootDir: __dirname, + }, +}; diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 3deb689..0000000 --- a/.eslintrc.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended", - "plugin:jest/recommended", - "prettier" - ], - "env": { - "browser": false, - "es6": true, - "node": true - }, - "parser": "@typescript-eslint/parser", - "parserOptions": { - "project": "tsconfig.json", - "sourceType": "module" - }, - "plugins": ["@typescript-eslint", "jest", "import"], - "rules": { - "sort-imports": ["error", { "ignoreDeclarationSort": true }], - "import/order": [ - "error", - { "alphabetize": { "order": "asc" }, "newlines-between": "never" } - ], - "no-return-await": "error", - "no-console": "error", - "import/no-default-export": "error", - "import/no-extraneous-dependencies": "error", - "import/no-unassigned-import": "error", - "@typescript-eslint/no-unused-vars": [ - "error", - { "argsIgnorePattern": "^_", "caughtErrors": "all" } - ], - "@typescript-eslint/no-unused-expressions": "error" - }, - "overrides": [ - { - "files": ["**/*.test.ts"], - "rules": { - "@typescript-eslint/ban-ts-comment": "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-unused-vars": "off", - "@typescript-eslint/no-var-requires": "off" - } - } - ] -} diff --git a/package.json b/package.json index 76b00ae..41f55e6 100644 --- a/package.json +++ b/package.json @@ -50,4 +50,4 @@ "typedoc-plugin-markdown": "^3.7.1", "typescript": "~4.2.4" } -} \ No newline at end of file +}