diff --git a/.eslintrc b/.eslintrc index fdefdd3..a5078ce 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,9 +1,15 @@ { "root": true, "extends": ["./index.js", "eslint-config-prettier"], - "plugins": ["eslint-plugin-prettier", "eslint-plugin-unicorn"], + "plugins": [ + "eslint-plugin-prettier", + "eslint-plugin-unicorn", + "eslint-plugin-import" + ], "rules": { - "prettier/prettier": 1 + "prettier/prettier": 1, + "unicorn/prefer-module": 0, + "import/no-commonjs": 0 }, "ignorePatterns": ["test/fixtures/*.config.*"], "overrides": [ diff --git a/index.js b/index.js index 34b9b28..1514a07 100644 --- a/index.js +++ b/index.js @@ -526,7 +526,7 @@ module.exports = { 'import/no-self-import': 2, 'import/export': 2, 'import/no-mutable-exports': 2, - 'import/no-commonjs': 1, + 'import/no-commonjs': 2, 'import/no-amd': 1, 'import/exports-last': 2, 'import/no-namespace': 1, @@ -562,7 +562,7 @@ module.exports = { 'import/no-named-export': 0, 'import/no-unused-modules': 0, 'unicorn/prefer-export-from': 0, - 'unicorn/prefer-module': 1, + 'unicorn/prefer-module': 2, 'n/file-extension-in-import': 0, 'import/extensions': [2, 'always', { ignorePackages: true }], 'import/consistent-type-specifier-style': 0, diff --git a/test/.eslintrc b/test/.eslintrc index c6ea8dd..884575d 100644 --- a/test/.eslintrc +++ b/test/.eslintrc @@ -3,5 +3,10 @@ "parserOptions": { "ecmaVersion": 2022, "sourceType": "module" + }, + "plugins": ["eslint-plugin-unicorn", "eslint-plugin-import"], + "rules": { + "unicorn/prefer-module": 2, + "import/no-commonjs": 2 } }