@prairielearn/eslint-config 1.1.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @prairielearn/eslint-config
2
2
 
3
+ ## 2.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 3c4799a: Upgrade to ESLint v10
8
+
9
+ ### Patch Changes
10
+
11
+ - 3c4799a: Upgrade all JavaScript dependencies
12
+ - 3c4799a: Disable the radix rule
13
+ - Updated dependencies [3c4799a]
14
+ - Updated dependencies [3c4799a]
15
+ - @prairielearn/eslint-plugin@4.0.0
16
+
3
17
  ## 1.1.0
4
18
 
5
19
  ### Minor Changes
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/configs/base.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAIzD;;;GAGG;AACH,wBAAgB,UAAU,IAAI,QAAQ,CAAC,UAAU,CAAC,WAAW,CAqH5D","sourcesContent":["import js from '@eslint/js';\nimport type { TSESLint } from '@typescript-eslint/utils';\nimport noFloatingPromise from 'eslint-plugin-no-floating-promise';\nimport globals from 'globals';\n\n/**\n * Base JavaScript/TypeScript configuration.\n * Core rules that apply to all JS/TS files.\n */\nexport function baseConfig(): TSESLint.FlatConfig.ConfigArray {\n return [\n {\n languageOptions: {\n globals: { ...globals.node },\n },\n\n linterOptions: {\n reportUnusedDisableDirectives: 'error',\n },\n\n plugins: {\n 'no-floating-promise': noFloatingPromise,\n },\n\n rules: {\n ...js.configs.all.rules,\n 'array-callback-return': 'off',\n 'arrow-body-style': 'off',\n camelcase: 'off',\n 'capitalized-comments': 'off',\n 'class-methods-use-this': 'off',\n complexity: 'off',\n 'consistent-return': 'off',\n 'consistent-this': 'off',\n curly: ['error', 'multi-line', 'consistent'],\n 'default-case': 'off',\n 'dot-notation': 'off',\n eqeqeq: ['error', 'smart'],\n 'func-names': 'off',\n 'func-style': 'off',\n 'guard-for-in': 'off',\n 'handle-callback-err': 'error',\n 'id-length': 'off',\n 'init-declarations': 'off',\n 'logical-assignment-operators': 'off',\n 'max-classes-per-file': 'off',\n 'max-depth': 'off',\n 'max-lines': 'off',\n 'max-lines-per-function': 'off',\n 'max-params': ['error', { max: 6 }],\n 'max-statements': 'off',\n 'new-cap': 'off',\n 'no-await-in-loop': 'off',\n 'no-bitwise': 'off',\n 'no-console': ['error', { allow: ['warn', 'error', 'table', 'trace'] }],\n 'no-continue': 'off',\n 'no-duplicate-imports': 'error',\n 'no-else-return': 'off',\n 'no-empty-function': 'off',\n 'no-eq-null': 'off',\n 'no-implicit-coercion': 'off',\n 'no-inline-comments': 'off',\n 'no-invalid-this': 'off',\n 'no-lonely-if': 'off',\n 'no-loop-func': 'off',\n 'no-magic-numbers': 'off',\n 'no-negated-condition': 'off',\n 'no-nested-ternary': 'off',\n 'no-new': 'off',\n 'no-param-reassign': 'off',\n 'no-plusplus': 'off',\n 'no-promise-executor-return': 'off',\n 'no-redeclare': 'off',\n 'no-restricted-globals': [\n 'error',\n // These are not available in ES modules.\n '__filename',\n '__dirname',\n ],\n 'no-shadow': 'off',\n 'no-template-curly-in-string': 'error',\n 'no-ternary': 'off',\n 'no-undef': 'off',\n 'no-undef-init': 'off',\n 'no-undefined': 'off',\n 'no-underscore-dangle': 'off',\n 'no-unmodified-loop-condition': 'off',\n 'no-unneeded-ternary': 'off',\n 'no-unused-vars': 'off',\n 'no-use-before-define': 'off',\n 'no-useless-assignment': 'off',\n 'no-useless-concat': 'off',\n 'no-useless-constructor': 'off',\n 'no-useless-return': 'off',\n 'no-void': 'off', // https://typescript-eslint.io/rules/no-floating-promises/#ignorevoid\n 'no-warning-comments': 'off',\n 'object-shorthand': 'error',\n 'one-var': ['off', 'never'],\n 'prefer-arrow-callback': 'off',\n 'prefer-const': ['error', { destructuring: 'all' }],\n 'prefer-destructuring': 'off',\n 'prefer-named-capture-group': 'off',\n 'prefer-object-has-own': 'off',\n 'prefer-template': 'off',\n radix: ['error', 'as-needed'],\n 'require-atomic-updates': 'off',\n 'require-await': 'off',\n 'require-unicode-regexp': 'off',\n 'sort-vars': 'off',\n 'sort-keys': 'off',\n\n // Floating promise detection\n 'no-floating-promise/no-floating-promise': 'error',\n\n // Sort imports within a single import statement\n 'sort-imports': [\n 'error',\n {\n ignoreDeclarationSort: true,\n ignoreMemberSort: false,\n memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],\n },\n ],\n },\n },\n ];\n}\n"]}
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/configs/base.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAIzD;;;GAGG;AACH,wBAAgB,UAAU,IAAI,QAAQ,CAAC,UAAU,CAAC,WAAW,CAqH5D","sourcesContent":["import js from '@eslint/js';\nimport type { TSESLint } from '@typescript-eslint/utils';\nimport noFloatingPromise from 'eslint-plugin-no-floating-promise';\nimport globals from 'globals';\n\n/**\n * Base JavaScript/TypeScript configuration.\n * Core rules that apply to all JS/TS files.\n */\nexport function baseConfig(): TSESLint.FlatConfig.ConfigArray {\n return [\n {\n languageOptions: {\n globals: { ...globals.node },\n },\n\n linterOptions: {\n reportUnusedDisableDirectives: 'error',\n },\n\n plugins: {\n 'no-floating-promise': noFloatingPromise,\n },\n\n rules: {\n ...js.configs.all.rules,\n 'array-callback-return': 'off',\n 'arrow-body-style': 'off',\n camelcase: 'off',\n 'capitalized-comments': 'off',\n 'class-methods-use-this': 'off',\n complexity: 'off',\n 'consistent-return': 'off',\n 'consistent-this': 'off',\n curly: ['error', 'multi-line', 'consistent'],\n 'default-case': 'off',\n 'dot-notation': 'off',\n eqeqeq: ['error', 'smart'],\n 'func-names': 'off',\n 'func-style': 'off',\n 'guard-for-in': 'off',\n 'handle-callback-err': 'error',\n 'id-length': 'off',\n 'init-declarations': 'off',\n 'logical-assignment-operators': 'off',\n 'max-classes-per-file': 'off',\n 'max-depth': 'off',\n 'max-lines': 'off',\n 'max-lines-per-function': 'off',\n 'max-params': ['error', { max: 6 }],\n 'max-statements': 'off',\n 'new-cap': 'off',\n 'no-await-in-loop': 'off',\n 'no-bitwise': 'off',\n 'no-console': ['error', { allow: ['warn', 'error', 'table', 'trace'] }],\n 'no-continue': 'off',\n 'no-duplicate-imports': 'error',\n 'no-else-return': 'off',\n 'no-empty-function': 'off',\n 'no-eq-null': 'off',\n 'no-implicit-coercion': 'off',\n 'no-inline-comments': 'off',\n 'no-invalid-this': 'off',\n 'no-lonely-if': 'off',\n 'no-loop-func': 'off',\n 'no-magic-numbers': 'off',\n 'no-negated-condition': 'off',\n 'no-nested-ternary': 'off',\n 'no-new': 'off',\n 'no-param-reassign': 'off',\n 'no-plusplus': 'off',\n 'no-promise-executor-return': 'off',\n 'no-redeclare': 'off',\n 'no-restricted-globals': [\n 'error',\n // These are not available in ES modules.\n '__filename',\n '__dirname',\n ],\n 'no-shadow': 'off',\n 'no-template-curly-in-string': 'error',\n 'no-ternary': 'off',\n 'no-undef': 'off',\n 'no-undef-init': 'off',\n 'no-undefined': 'off',\n 'no-underscore-dangle': 'off',\n 'no-unmodified-loop-condition': 'off',\n 'no-unneeded-ternary': 'off',\n 'no-unused-vars': 'off',\n 'no-use-before-define': 'off',\n 'no-useless-assignment': 'off',\n 'no-useless-concat': 'off',\n 'no-useless-constructor': 'off',\n 'no-useless-return': 'off',\n 'no-void': 'off', // https://typescript-eslint.io/rules/no-floating-promises/#ignorevoid\n 'no-warning-comments': 'off',\n 'object-shorthand': 'error',\n 'one-var': ['off', 'never'],\n 'prefer-arrow-callback': 'off',\n 'prefer-const': ['error', { destructuring: 'all' }],\n 'prefer-destructuring': 'off',\n 'prefer-named-capture-group': 'off',\n 'prefer-object-has-own': 'off',\n 'prefer-template': 'off',\n radix: ['off'], // We should never rely on this for parsing non-decimal numbers.\n 'require-atomic-updates': 'off',\n 'require-await': 'off',\n 'require-unicode-regexp': 'off',\n 'sort-vars': 'off',\n 'sort-keys': 'off',\n\n // Floating promise detection\n 'no-floating-promise/no-floating-promise': 'error',\n\n // Sort imports within a single import statement\n 'sort-imports': [\n 'error',\n {\n ignoreDeclarationSort: true,\n ignoreMemberSort: false,\n memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],\n },\n ],\n },\n },\n ];\n}\n"]}
@@ -97,7 +97,7 @@ export function baseConfig() {
97
97
  'prefer-named-capture-group': 'off',
98
98
  'prefer-object-has-own': 'off',
99
99
  'prefer-template': 'off',
100
- radix: ['error', 'as-needed'],
100
+ radix: ['off'], // We should never rely on this for parsing non-decimal numbers.
101
101
  'require-atomic-updates': 'off',
102
102
  'require-await': 'off',
103
103
  'require-unicode-regexp': 'off',
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/configs/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,OAAO,iBAAiB,MAAM,mCAAmC,CAAC;AAClE,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B;;;GAGG;AACH,MAAM,UAAU,UAAU,GAAoC;IAC5D,OAAO;QACL;YACE,eAAe,EAAE;gBACf,OAAO,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,EAAE;aAC7B;YAED,aAAa,EAAE;gBACb,6BAA6B,EAAE,OAAO;aACvC;YAED,OAAO,EAAE;gBACP,qBAAqB,EAAE,iBAAiB;aACzC;YAED,KAAK,EAAE;gBACL,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK;gBACvB,uBAAuB,EAAE,KAAK;gBAC9B,kBAAkB,EAAE,KAAK;gBACzB,SAAS,EAAE,KAAK;gBAChB,sBAAsB,EAAE,KAAK;gBAC7B,wBAAwB,EAAE,KAAK;gBAC/B,UAAU,EAAE,KAAK;gBACjB,mBAAmB,EAAE,KAAK;gBAC1B,iBAAiB,EAAE,KAAK;gBACx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,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,CAAC;qBAC7D;iBACF;aACF;SACF;KACF,CAAC;AAAA,CACH","sourcesContent":["import js from '@eslint/js';\nimport type { TSESLint } from '@typescript-eslint/utils';\nimport noFloatingPromise from 'eslint-plugin-no-floating-promise';\nimport globals from 'globals';\n\n/**\n * Base JavaScript/TypeScript configuration.\n * Core rules that apply to all JS/TS files.\n */\nexport function baseConfig(): TSESLint.FlatConfig.ConfigArray {\n return [\n {\n languageOptions: {\n globals: { ...globals.node },\n },\n\n linterOptions: {\n reportUnusedDisableDirectives: 'error',\n },\n\n plugins: {\n 'no-floating-promise': noFloatingPromise,\n },\n\n rules: {\n ...js.configs.all.rules,\n 'array-callback-return': 'off',\n 'arrow-body-style': 'off',\n camelcase: 'off',\n 'capitalized-comments': 'off',\n 'class-methods-use-this': 'off',\n complexity: 'off',\n 'consistent-return': 'off',\n 'consistent-this': 'off',\n curly: ['error', 'multi-line', 'consistent'],\n 'default-case': 'off',\n 'dot-notation': 'off',\n eqeqeq: ['error', 'smart'],\n 'func-names': 'off',\n 'func-style': 'off',\n 'guard-for-in': 'off',\n 'handle-callback-err': 'error',\n 'id-length': 'off',\n 'init-declarations': 'off',\n 'logical-assignment-operators': 'off',\n 'max-classes-per-file': 'off',\n 'max-depth': 'off',\n 'max-lines': 'off',\n 'max-lines-per-function': 'off',\n 'max-params': ['error', { max: 6 }],\n 'max-statements': 'off',\n 'new-cap': 'off',\n 'no-await-in-loop': 'off',\n 'no-bitwise': 'off',\n 'no-console': ['error', { allow: ['warn', 'error', 'table', 'trace'] }],\n 'no-continue': 'off',\n 'no-duplicate-imports': 'error',\n 'no-else-return': 'off',\n 'no-empty-function': 'off',\n 'no-eq-null': 'off',\n 'no-implicit-coercion': 'off',\n 'no-inline-comments': 'off',\n 'no-invalid-this': 'off',\n 'no-lonely-if': 'off',\n 'no-loop-func': 'off',\n 'no-magic-numbers': 'off',\n 'no-negated-condition': 'off',\n 'no-nested-ternary': 'off',\n 'no-new': 'off',\n 'no-param-reassign': 'off',\n 'no-plusplus': 'off',\n 'no-promise-executor-return': 'off',\n 'no-redeclare': 'off',\n 'no-restricted-globals': [\n 'error',\n // These are not available in ES modules.\n '__filename',\n '__dirname',\n ],\n 'no-shadow': 'off',\n 'no-template-curly-in-string': 'error',\n 'no-ternary': 'off',\n 'no-undef': 'off',\n 'no-undef-init': 'off',\n 'no-undefined': 'off',\n 'no-underscore-dangle': 'off',\n 'no-unmodified-loop-condition': 'off',\n 'no-unneeded-ternary': 'off',\n 'no-unused-vars': 'off',\n 'no-use-before-define': 'off',\n 'no-useless-assignment': 'off',\n 'no-useless-concat': 'off',\n 'no-useless-constructor': 'off',\n 'no-useless-return': 'off',\n 'no-void': 'off', // https://typescript-eslint.io/rules/no-floating-promises/#ignorevoid\n 'no-warning-comments': 'off',\n 'object-shorthand': 'error',\n 'one-var': ['off', 'never'],\n 'prefer-arrow-callback': 'off',\n 'prefer-const': ['error', { destructuring: 'all' }],\n 'prefer-destructuring': 'off',\n 'prefer-named-capture-group': 'off',\n 'prefer-object-has-own': 'off',\n 'prefer-template': 'off',\n radix: ['error', 'as-needed'],\n 'require-atomic-updates': 'off',\n 'require-await': 'off',\n 'require-unicode-regexp': 'off',\n 'sort-vars': 'off',\n 'sort-keys': 'off',\n\n // Floating promise detection\n 'no-floating-promise/no-floating-promise': 'error',\n\n // Sort imports within a single import statement\n 'sort-imports': [\n 'error',\n {\n ignoreDeclarationSort: true,\n ignoreMemberSort: false,\n memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],\n },\n ],\n },\n },\n ];\n}\n"]}
1
+ {"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/configs/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,OAAO,iBAAiB,MAAM,mCAAmC,CAAC;AAClE,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B;;;GAGG;AACH,MAAM,UAAU,UAAU,GAAoC;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KAAK,EAAE,CAAC;gBACnD,sBAAsB,EAAE,KAAK;gBAC7B,4BAA4B,EAAE,KAAK;gBACnC,uBAAuB,EAAE,KAAK;gBAC9B,iBAAiB,EAAE,KAAK;gBACxB,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,gEAAgE;gBAChF,wBAAwB,EAAE,KAAK;gBAC/B,eAAe,EAAE,KAAK;gBACtB,wBAAwB,EAAE,KAAK;gBAC/B,WAAW,EAAE,KAAK;gBAClB,WAAW,EAAE,KAAK;gBAElB,6BAA6B;gBAC7B,yCAAyC,EAAE,OAAO;gBAElD,gDAAgD;gBAChD,cAAc,EAAE;oBACd,OAAO;oBACP;wBACE,qBAAqB,EAAE,IAAI;wBAC3B,gBAAgB,EAAE,KAAK;wBACvB,qBAAqB,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,CAAC;qBAC7D;iBACF;aACF;SACF;KACF,CAAC;AAAA,CACH","sourcesContent":["import js from '@eslint/js';\nimport type { TSESLint } from '@typescript-eslint/utils';\nimport noFloatingPromise from 'eslint-plugin-no-floating-promise';\nimport globals from 'globals';\n\n/**\n * Base JavaScript/TypeScript configuration.\n * Core rules that apply to all JS/TS files.\n */\nexport function baseConfig(): TSESLint.FlatConfig.ConfigArray {\n return [\n {\n languageOptions: {\n globals: { ...globals.node },\n },\n\n linterOptions: {\n reportUnusedDisableDirectives: 'error',\n },\n\n plugins: {\n 'no-floating-promise': noFloatingPromise,\n },\n\n rules: {\n ...js.configs.all.rules,\n 'array-callback-return': 'off',\n 'arrow-body-style': 'off',\n camelcase: 'off',\n 'capitalized-comments': 'off',\n 'class-methods-use-this': 'off',\n complexity: 'off',\n 'consistent-return': 'off',\n 'consistent-this': 'off',\n curly: ['error', 'multi-line', 'consistent'],\n 'default-case': 'off',\n 'dot-notation': 'off',\n eqeqeq: ['error', 'smart'],\n 'func-names': 'off',\n 'func-style': 'off',\n 'guard-for-in': 'off',\n 'handle-callback-err': 'error',\n 'id-length': 'off',\n 'init-declarations': 'off',\n 'logical-assignment-operators': 'off',\n 'max-classes-per-file': 'off',\n 'max-depth': 'off',\n 'max-lines': 'off',\n 'max-lines-per-function': 'off',\n 'max-params': ['error', { max: 6 }],\n 'max-statements': 'off',\n 'new-cap': 'off',\n 'no-await-in-loop': 'off',\n 'no-bitwise': 'off',\n 'no-console': ['error', { allow: ['warn', 'error', 'table', 'trace'] }],\n 'no-continue': 'off',\n 'no-duplicate-imports': 'error',\n 'no-else-return': 'off',\n 'no-empty-function': 'off',\n 'no-eq-null': 'off',\n 'no-implicit-coercion': 'off',\n 'no-inline-comments': 'off',\n 'no-invalid-this': 'off',\n 'no-lonely-if': 'off',\n 'no-loop-func': 'off',\n 'no-magic-numbers': 'off',\n 'no-negated-condition': 'off',\n 'no-nested-ternary': 'off',\n 'no-new': 'off',\n 'no-param-reassign': 'off',\n 'no-plusplus': 'off',\n 'no-promise-executor-return': 'off',\n 'no-redeclare': 'off',\n 'no-restricted-globals': [\n 'error',\n // These are not available in ES modules.\n '__filename',\n '__dirname',\n ],\n 'no-shadow': 'off',\n 'no-template-curly-in-string': 'error',\n 'no-ternary': 'off',\n 'no-undef': 'off',\n 'no-undef-init': 'off',\n 'no-undefined': 'off',\n 'no-underscore-dangle': 'off',\n 'no-unmodified-loop-condition': 'off',\n 'no-unneeded-ternary': 'off',\n 'no-unused-vars': 'off',\n 'no-use-before-define': 'off',\n 'no-useless-assignment': 'off',\n 'no-useless-concat': 'off',\n 'no-useless-constructor': 'off',\n 'no-useless-return': 'off',\n 'no-void': 'off', // https://typescript-eslint.io/rules/no-floating-promises/#ignorevoid\n 'no-warning-comments': 'off',\n 'object-shorthand': 'error',\n 'one-var': ['off', 'never'],\n 'prefer-arrow-callback': 'off',\n 'prefer-const': ['error', { destructuring: 'all' }],\n 'prefer-destructuring': 'off',\n 'prefer-named-capture-group': 'off',\n 'prefer-object-has-own': 'off',\n 'prefer-template': 'off',\n radix: ['off'], // We should never rely on this for parsing non-decimal numbers.\n 'require-atomic-updates': 'off',\n 'require-await': 'off',\n 'require-unicode-regexp': 'off',\n 'sort-vars': 'off',\n 'sort-keys': 'off',\n\n // Floating promise detection\n 'no-floating-promise/no-floating-promise': 'error',\n\n // Sort imports within a single import statement\n 'sort-imports': [\n 'error',\n {\n ignoreDeclarationSort: true,\n ignoreMemberSort: false,\n memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],\n },\n ],\n },\n },\n ];\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prairielearn/eslint-config",
3
- "version": "1.1.0",
3
+ "version": "2.0.0",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -19,34 +19,34 @@
19
19
  "dev": "tsgo --watch --preserveWatchOutput"
20
20
  },
21
21
  "peerDependencies": {
22
- "eslint": "^9.0.0",
22
+ "eslint": "^10.0.0",
23
23
  "typescript": "^5.0.0"
24
24
  },
25
25
  "dependencies": {
26
- "@eslint-react/eslint-plugin": "^2.9.4",
27
- "@eslint/eslintrc": "^3.0.0",
28
- "@eslint/js": "^9.29.0",
29
- "@prairielearn/eslint-plugin": "^3.1.1",
30
- "@stylistic/eslint-plugin": "^5.7.0",
31
- "@tanstack/eslint-plugin-query": "^5.91.2",
32
- "@typescript-eslint/utils": "^8.53.0",
33
- "@vitest/eslint-plugin": "^1.6.6",
26
+ "@eslint-react/eslint-plugin": "^2.13.0",
27
+ "@eslint/eslintrc": "^3.3.4",
28
+ "@eslint/js": "^10.0.1",
29
+ "@prairielearn/eslint-plugin": "^4.0.0",
30
+ "@stylistic/eslint-plugin": "^5.9.0",
31
+ "@tanstack/eslint-plugin-query": "^5.91.4",
32
+ "@typescript-eslint/utils": "^8.56.1",
33
+ "@vitest/eslint-plugin": "^1.6.9",
34
34
  "eslint-import-resolver-typescript": "^4.4.4",
35
35
  "eslint-plugin-import-x": "^4.16.1",
36
- "eslint-plugin-jsdoc": "^62.0.0",
36
+ "eslint-plugin-jsdoc": "^62.7.1",
37
37
  "eslint-plugin-jsx-a11y-x": "^0.1.1",
38
38
  "eslint-plugin-no-floating-promise": "^2.0.0",
39
- "eslint-plugin-perfectionist": "^5.3.1",
39
+ "eslint-plugin-perfectionist": "^5.6.0",
40
40
  "eslint-plugin-react-hooks": "^7.0.1",
41
- "eslint-plugin-react-you-might-not-need-an-effect": "^0.8.5",
42
- "eslint-plugin-unicorn": "^62.0.0",
41
+ "eslint-plugin-react-you-might-not-need-an-effect": "^0.9.1",
42
+ "eslint-plugin-unicorn": "^63.0.0",
43
43
  "eslint-plugin-you-dont-need-lodash-underscore": "^6.14.0",
44
- "globals": "^16.5.0",
45
- "typescript-eslint": "^8.53.0"
44
+ "globals": "^17.4.0",
45
+ "typescript-eslint": "^8.56.1"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@prairielearn/tsconfig": "^2.0.0",
49
- "@types/node": "^24.10.9",
50
- "@typescript/native-preview": "^7.0.0-dev.20260106.1"
49
+ "@types/node": "^24.11.0",
50
+ "@typescript/native-preview": "^7.0.0-dev.20260302.1"
51
51
  }
52
52
  }
@@ -102,7 +102,7 @@ export function baseConfig(): TSESLint.FlatConfig.ConfigArray {
102
102
  'prefer-named-capture-group': 'off',
103
103
  'prefer-object-has-own': 'off',
104
104
  'prefer-template': 'off',
105
- radix: ['error', 'as-needed'],
105
+ radix: ['off'], // We should never rely on this for parsing non-decimal numbers.
106
106
  'require-atomic-updates': 'off',
107
107
  'require-await': 'off',
108
108
  'require-unicode-regexp': 'off',