diff --git a/config/plugins.cjs b/config/plugins.cjs index 4b428320..88712ab7 100644 --- a/config/plugins.cjs +++ b/config/plugins.cjs @@ -180,6 +180,9 @@ module.exports = { // TODO: Temporarily disabled until it becomes more mature. 'unicorn/no-useless-undefined': 'off', + // TODO: Enable it when I have tried it more in practice. + 'unicorn/prefer-string-raw': 'off', + // TODO: Temporarily disabled as the rule is buggy. 'function-call-argument-newline': 'off', @@ -354,7 +357,7 @@ module.exports = { 'n/process-exit-as-throw': 'error', // Disabled as the rule doesn't exclude scripts executed with `node` but not referenced in 'bin'. See https://github.com/mysticatea/eslint-plugin-node/issues/96 - // 'n/shebang': 'error', + // 'n/hashbang': 'error', 'n/no-deprecated-api': 'error', diff --git a/lib/options-manager.js b/lib/options-manager.js index d7e5807e..7d7b1573 100644 --- a/lib/options-manager.js +++ b/lib/options-manager.js @@ -101,7 +101,13 @@ The config files are searched starting from `options.filePath` if defined or `op */ const mergeWithFileConfig = async options => { options.cwd = path.resolve(options.cwd || process.cwd()); - const configExplorer = cosmiconfig(MODULE_NAME, {searchPlaces: CONFIG_FILES, loaders: {noExt: defaultLoaders['.json']}, stopDir: options.cwd}); + + const configExplorer = cosmiconfig(MODULE_NAME, { + searchPlaces: CONFIG_FILES, + loaders: {noExt: defaultLoaders['.json']}, + stopDir: options.cwd, + }); + const packageConfigExplorer = cosmiconfig('engines', {searchPlaces: ['package.json'], stopDir: options.cwd}); options.filePath &&= path.resolve(options.cwd, options.filePath); diff --git a/package.json b/package.json index 7bb9687f..74f7a3a4 100644 --- a/package.json +++ b/package.json @@ -54,16 +54,16 @@ "typescript" ], "dependencies": { - "@eslint/eslintrc": "^3.0.2", - "@typescript-eslint/eslint-plugin": "^7.1.1", - "@typescript-eslint/parser": "^7.1.1", + "@eslint/eslintrc": "^3.1.0", + "@typescript-eslint/eslint-plugin": "^7.16.1", + "@typescript-eslint/parser": "^7.16.1", "arrify": "^3.0.0", - "cosmiconfig": "^8.3.6", + "cosmiconfig": "^9.0.0", "define-lazy-prop": "^3.0.0", "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", - "eslint-config-xo": "^0.44.0", - "eslint-config-xo-typescript": "^4.0.0", + "eslint-config-xo": "^0.45.0", + "eslint-config-xo-typescript": "^5.0.0", "eslint-formatter-pretty": "^6.0.1", "eslint-import-resolver-webpack": "^0.13.8", "eslint-plugin-ava": "^14.0.0", @@ -71,37 +71,37 @@ "eslint-plugin-import": "^2.29.1", "eslint-plugin-n": "^17.9.0", "eslint-plugin-no-use-extend-native": "^0.5.0", - "eslint-plugin-prettier": "^5.1.3", + "eslint-plugin-prettier": "^5.2.1", "eslint-plugin-promise": "^6.4.0", - "eslint-plugin-unicorn": "^51.0.1", - "esm-utils": "^4.2.1", + "eslint-plugin-unicorn": "^54.0.0", + "esm-utils": "^4.3.0", "find-cache-dir": "^5.0.0", "find-up-simple": "^1.0.0", "get-stdin": "^9.0.0", - "get-tsconfig": "^4.7.3", - "globby": "^14.0.1", + "get-tsconfig": "^4.7.5", + "globby": "^14.0.2", "imurmurhash": "^0.1.4", "json-stable-stringify-without-jsonify": "^1.0.1", "lodash-es": "^4.17.21", "meow": "^13.2.0", - "micromatch": "^4.0.5", - "open-editor": "^4.1.1", - "prettier": "^3.2.5", - "semver": "^7.6.0", + "micromatch": "^4.0.7", + "open-editor": "^5.0.0", + "prettier": "^3.3.3", + "semver": "^7.6.3", "slash": "^5.1.0", "to-absolute-glob": "^3.0.0", - "typescript": "^5.4.2" + "typescript": "^5.5.3" }, "devDependencies": { - "ava": "^6.1.2", + "ava": "^6.1.3", "eslint-config-xo-react": "^0.27.0", - "eslint-plugin-react": "^7.34.0", - "eslint-plugin-react-hooks": "^4.6.0", - "execa": "^8.0.1", - "nyc": "^15.1.0", + "eslint-plugin-react": "^7.34.4", + "eslint-plugin-react-hooks": "^4.6.2", + "execa": "^9.3.0", + "nyc": "^17.0.0", "proxyquire": "^2.1.3", "temp-write": "^5.0.0", - "webpack": "^5.90.3" + "webpack": "^5.93.0" }, "xo": { "ignores": [ diff --git a/test/fixtures/overrides/package.json b/test/fixtures/overrides/package.json index b1dbfd07..57d549c9 100644 --- a/test/fixtures/overrides/package.json +++ b/test/fixtures/overrides/package.json @@ -16,7 +16,8 @@ "import/no-extraneous-dependencies": "off", "ava/no-ignored-test-files": "off", "unicorn/prefer-module": "off", - "unicorn/prefer-node-protocol": "off" + "unicorn/prefer-node-protocol": "off", + "unicorn/no-anonymous-default-export": "off" } } }