-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adjust rule tests to new RuleTester behavior replaced usages of deprecated APIs
- Loading branch information
Showing
14 changed files
with
281 additions
and
356 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import pluginJs from '@eslint/js'; | ||
import configPrettier from 'eslint-config-prettier'; | ||
import pluginTypescript from 'typescript-eslint'; | ||
|
||
for (const config of pluginTypescript.configs.recommendedTypeChecked) { | ||
config.files = ['**/*.{ts,tsx,mts,cts}']; // ensure config only targets TypeScript files | ||
} | ||
|
||
/** @type {import('eslint').Linter.Config[]} */ | ||
export default [ | ||
{ | ||
ignores: [ | ||
'**/dist/', | ||
'**/esm/', | ||
'packages/create-stylable-app/typings/template.d.ts', | ||
'packages/language-service/test/fixtures/server-cases/mixins/', | ||
'packages/runtime/stylesheet.d.ts', | ||
], | ||
}, | ||
pluginJs.configs.recommended, | ||
{ | ||
rules: { | ||
'no-console': 'off', | ||
'no-undef': 'off', | ||
'no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }], | ||
}, | ||
}, | ||
...pluginTypescript.configs.recommendedTypeChecked, | ||
{ languageOptions: { parserOptions: { projectService: true } } }, | ||
{ | ||
files: ['**/*.{ts,tsx,mts,cts}'], | ||
rules: { | ||
'@typescript-eslint/no-base-to-string': 'off', | ||
'@typescript-eslint/no-empty-object-type': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-require-imports': 'off', | ||
|
||
'@typescript-eslint/no-unsafe-argument': 'off', | ||
'@typescript-eslint/no-unsafe-assignment': 'off', | ||
'@typescript-eslint/no-unsafe-call': 'off', | ||
'@typescript-eslint/no-unsafe-member-access': 'off', | ||
'@typescript-eslint/no-unsafe-return': 'off', | ||
|
||
'@typescript-eslint/no-unused-expressions': 'off', | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' }, | ||
], | ||
'@typescript-eslint/restrict-plus-operands': 'off', | ||
'@typescript-eslint/restrict-template-expressions': 'off', | ||
'@typescript-eslint/unbound-method': 'off', | ||
}, | ||
}, | ||
configPrettier, | ||
]; |
Oops, something went wrong.