Skip to content

Commit

Permalink
fix(deps): update dependency eslint to ~9.19.0, enable `reportUnusedI…
Browse files Browse the repository at this point in the history
…nlineConfigs` (#320)

* chore(deps): update dependency eslint to ~9.19.0

* feat: Conditionally enable `reportUnusedInlineConfigs` in base config

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Bartosz Dotryw <burtekdotryw@gmail.com>
  • Loading branch information
renovate[bot] and burtek authored Jan 25, 2025
1 parent 6c8662f commit 6d42f5b
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 14 deletions.
10 changes: 8 additions & 2 deletions configs/base.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
/* eslint no-warning-comments: 1 */
import js from '@eslint/js';
import stylisticPlugin from '@stylistic/eslint-plugin';
import eslint from 'eslint';
import { createTypeScriptImportResolver } from 'eslint-import-resolver-typescript';
import importPlugin from 'eslint-plugin-import-x';
import promise from 'eslint-plugin-promise';
import semver from 'semver';
import tseslint from 'typescript-eslint';

import { baseNamingRuleConfig } from './share/naming-config.js';


// eslint-disable-next-line no-warning-comments
// TODO: need no-splice-add and no-splice-remove

const allFiles = ['**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}'];
Expand Down Expand Up @@ -40,7 +42,11 @@ export function prepareConfig({ nextResolver = false } = {}) {
{
name: 'dtrw:base:base',
files: allFiles,
linterOptions: { reportUnusedDisableDirectives: true },
linterOptions: {
reportUnusedDisableDirectives: true,
// TODO: typechecking doesn't check this
...semver.satisfies(eslint.Linter.version, '>=9.19.0') ? { reportUnusedInlineConfigs: 'warn' } : {}
},
settings: {
'import-x/extensions': allImportExtensions,
'import-x/external-module-folders': ['node_modules', 'node_modules/@types'],
Expand Down
2 changes: 1 addition & 1 deletion configs/cypress.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint no-warning-comments: 1 */
import cypress from 'eslint-plugin-cypress/flat';
import tseslint from 'typescript-eslint';

Expand All @@ -23,7 +24,6 @@ export function prepareConfig() {
// chai-friendly
'no-unused-expressions': 'off',
'@typescript-eslint/no-unused-expressions': 'off'
// eslint-disable-next-line no-warning-comments
// TODO: fork of those above based on https://github.com/ihordiachenko/eslint-plugin-chai-friendly/blob/master/lib/rules/no-unused-expressions.js
}
}
Expand Down
1 change: 0 additions & 1 deletion configs/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ const testFiles = ['**/*.test.{js,cjs,mjs,jsx,ts,cts,mts,tsx}'];
const tsFiles = ['**/*.{ts,cts,mts,tsx}'];
const jsxFiles = ['**/*.{jsx,tsx}'];

// eslint-disable-next-line no-warning-comments
// TODO: move to FlatConfig once react-hooks is upgraded
/**
* @param {Object} [config]
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,17 @@
"eslint-plugin-testing-library": "7.1.1",
"globals": "15.14.0",
"jsonc-eslint-parser": "2.4.0",
"semver": "^7.6.3",
"typescript-eslint": "8.21.0"
},
"devDependencies": {
"@types/eslint": "^9.6.1",
"@types/eslint__js": "^8.42.3",
"@types/jest": "^29.5.14",
"@types/node": "^22.10.0",
"@types/semver": "^7.5.8",
"commit-and-tag-version": "^12.5.0",
"eslint": "~9.18.0",
"eslint": "~9.19.0",
"exit-code": "^1.0.2",
"jest": "^29.7.0",
"jiti": "^2.4.2",
Expand Down
23 changes: 14 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,10 @@
minimatch "^3.1.2"
strip-json-comments "^3.1.1"

"@eslint/js@9.18.0":
version "9.18.0"
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.18.0.tgz#3356f85d18ed3627ab107790b53caf7e1e3d1e84"
integrity sha512-fK6L7rxcq6/z+AaQMtiFTkvbHkBLNlwyRxHpKawP0x3u9+NC6MQTnFW+AdpwC6gfHTW0051cokQgtTN2FqlxQA==
"@eslint/js@9.19.0":
version "9.19.0"
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.19.0.tgz#51dbb140ed6b49d05adc0b171c41e1a8713b7789"
integrity sha512-rbq9/g38qjfqFLOVPvwjIvFFdNziEC5S65jmjPw5r6A//QH+W91akh9irMwjDN8zKUTak6W9EsAv4m/7Wnw0UQ==

"@eslint/json@0.10.0":
version "0.10.0"
Expand Down Expand Up @@ -853,6 +853,11 @@
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz#56e2cc26c397c038fab0e3a917a12d5c5909e901"
integrity sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==

"@types/semver@^7.5.8":
version "7.5.8"
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e"
integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==

"@types/stack-utils@^2.0.0":
version "2.0.3"
resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.3.tgz#6209321eb2c1712a7e7466422b8cb1fc0d9dd5d8"
Expand Down Expand Up @@ -2262,17 +2267,17 @@ eslint-visitor-keys@^4.2.0:
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz#687bacb2af884fcdda8a6e7d65c606f46a14cd45"
integrity sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==

eslint@~9.18.0:
version "9.18.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.18.0.tgz#c95b24de1183e865de19f607fda6518b54827850"
integrity sha512-+waTfRWQlSbpt3KWE+CjrPPYnbq9kfZIYUqapc0uBXyjTp8aYXZDsUH16m39Ryq3NjAVP4tjuF7KaukeqoCoaA==
eslint@~9.19.0:
version "9.19.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.19.0.tgz#ffa1d265fc4205e0f8464330d35f09e1d548b1bf"
integrity sha512-ug92j0LepKlbbEv6hD911THhoRHmbdXt2gX+VDABAW/Ir7D3nqKdv5Pf5vtlyY6HQMTEP2skXY43ueqTCWssEA==
dependencies:
"@eslint-community/eslint-utils" "^4.2.0"
"@eslint-community/regexpp" "^4.12.1"
"@eslint/config-array" "^0.19.0"
"@eslint/core" "^0.10.0"
"@eslint/eslintrc" "^3.2.0"
"@eslint/js" "9.18.0"
"@eslint/js" "9.19.0"
"@eslint/plugin-kit" "^0.2.5"
"@humanfs/node" "^0.16.6"
"@humanwhocodes/module-importer" "^1.0.1"
Expand Down

0 comments on commit 6d42f5b

Please # to comment.