Skip to content

Commit

Permalink
chore: Update TypeScript ESLint (#6051)
Browse files Browse the repository at this point in the history
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
Jason3S and dependabot[bot] authored Aug 6, 2024
1 parent 80371b6 commit 1a5cb3e
Show file tree
Hide file tree
Showing 8 changed files with 111 additions and 350 deletions.
8 changes: 0 additions & 8 deletions .eslintrc.test.plugin.js

This file was deleted.

26 changes: 25 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export default tsEslint.config(
...tsEslint.configs.recommended,
// unicorn.configs['flat/recommended'],
{
ignores: ['**/*.json'],
plugins: {
unicorn,
},
Expand Down Expand Up @@ -226,6 +227,14 @@ export default tsEslint.config(
rules: {
'unicorn/prefer-module': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-require-imports': 'off',
},
},
{
files: ['**/*.json'],
rules: {
'@typescript-eslint/no-unused-expressions': 'off',
'unicorn/no-null': 'off',
},
},
{
Expand All @@ -252,11 +261,26 @@ export default tsEslint.config(
'unicorn/no-useless-undefined': 'off', // undefined is allowed in tests
},
},
{
files: ['**/*.{ts,mts,cts}'],
rules: {
// Turn off for now
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
},
},
{
files: ['**/*.test.{ts,mts,cts}', '**/*.spec.ts'],
rules: {
'@typescript-eslint/no-unused-expressions': 'off',
},
},
{
files: ['**/vitest.config.*', '**/jest.config.*', '**/__mocks__/**'],
rules: {
'n/no-extraneous-require': 'off',
'@typescript-eslint/no-require-imports': 'off',
'n/no-extraneous-import': 'off',
'n/no-extraneous-require': 'off',
'no-undef': 'off',
'unicorn/prefer-module': 'off',
},
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@
"@vitest/coverage-istanbul": "^2.0.5",
"conventional-changelog-conventionalcommits": "^8.0.0",
"eslint": "^9.8.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-jest": "^28.7.0",
"eslint-plugin-n": "^17.10.2",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-unicorn": "^55.0.0",
Expand All @@ -127,7 +125,7 @@
"ts2mjs": "^3.0.0",
"tslib": "^2.6.3",
"typescript": "^5.5.4",
"typescript-eslint": "^7.18.0",
"typescript-eslint": "^8.0.1",
"vite": "^5.3.5",
"vitest": "^2.0.5"
}
Expand Down
6 changes: 3 additions & 3 deletions packages/cspell-eslint-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@
"@types/eslint": "^8.56.11",
"@types/estree": "^1.0.5",
"@types/mocha": "^10.0.7",
"@typescript-eslint/parser": "^7.18.0",
"@typescript-eslint/types": "^7.18.0",
"@typescript-eslint/parser": "^8.0.1",
"@typescript-eslint/types": "^8.0.1",
"eslint": "^9.8.0",
"eslint-plugin-jsonc": "^2.16.0",
"eslint-plugin-mdx": "^3.1.5",
Expand All @@ -98,7 +98,7 @@
"mocha": "^10.7.0",
"ts-json-schema-generator": "^2.3.0",
"typescript": "^5.5.4",
"typescript-eslint": "^7.18.0",
"typescript-eslint": "^8.0.1",
"yaml-eslint-parser": "^1.2.3"
},
"dependencies": {
Expand Down
14 changes: 12 additions & 2 deletions packages/cspell-types/src/features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,23 @@ export interface FeaturesExperimental {
/**
* These are the current set of active features
*/
export interface FeaturesActive {}
export interface FeaturesActive {
/**
* @hidden
*/
featureName?: boolean;
}

/**
* These are feature settings that have been deprecated or moved elsewhere they will have no
* effect on the code but are here to prevent schema errors. The will get cleaned out on major versions.
*/
export interface FeaturesDeprecated {}
export interface FeaturesDeprecated {
/**
* @hidden
*/
featureName?: boolean;
}

/**
* Features are behaviors or settings that can be explicitly configured.
Expand Down
3 changes: 1 addition & 2 deletions packages/cspell-types/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/ban-types */

export type Serialize<T> = T extends Function
export type Serialize<T> = T extends () => void
? never
: T extends null
? null
Expand Down
Loading

0 comments on commit 1a5cb3e

Please sign in to comment.