diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 06c3eac..0000000 --- a/.eslintignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules/ -coverage/ -dist/ diff --git a/eslint.config.mjs b/eslint.config.mjs index ad82916..1ca9d16 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,20 +1,33 @@ -{ - "env": { - "browser": true, - "es2022": true, +import globals from 'globals'; +import configLove from 'eslint-config-love'; +// Includes both `config` and `plugin`. +import pluginPrettier from 'eslint-plugin-prettier/recommended'; + +export default [ + { + ignores: ['coverage/**', 'dist/**'], }, - "extends": ["love", "plugin:prettier/recommended"], - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module", - "project": "./tsconfig.json", + configLove, + pluginPrettier, + { + name: 'custom-rules', + files: ['**/*.ts', '**/*.js', '**/*.mjs'], + languageOptions: { + ...configLove.languageOptions, + globals: { + ...globals.browser, + }, + ecmaVersion: 2022, + sourceType: 'module', + }, + rules: { + 'no-console': 'warn', + '@typescript-eslint/explicit-function-return-type': 'off', + // '@typescript-eslint/strict-boolean-expressions': 'off', + '@typescript-eslint/consistent-indexed-object-style': [ + 'error', + 'index-signature', + ], + }, }, - "rules": { - "no-console": "warn", - "@typescript-eslint/explicit-function-return-type": "off", - "@typescript-eslint/consistent-indexed-object-style": [ - "error", - "index-signature", - ], - }, -} +];