-
-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into default-theme-image-transparency
- Loading branch information
Showing
11 changed files
with
218 additions
and
136 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,60 @@ | ||
import js from '@eslint/js' | ||
import eslintConfigPrettier from 'eslint-config-prettier' | ||
import eslintPluginImportX from 'eslint-plugin-import-x' | ||
import eslintPluginJest from 'eslint-plugin-jest' | ||
import globals from 'globals' | ||
import tseslint from 'typescript-eslint' | ||
|
||
const tsFiles = ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts'] | ||
const testFiles = ['test/**'] | ||
const forFiles = (files, confs) => confs.map((conf) => ({ ...conf, files })) | ||
|
||
export default tseslint.config( | ||
js.configs.recommended, | ||
eslintPluginImportX.flatConfigs.recommended, | ||
...forFiles(tsFiles, [ | ||
...tseslint.configs.recommended, | ||
eslintPluginImportX.flatConfigs.typescript, | ||
{ | ||
rules: { | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
}, | ||
}, | ||
]), | ||
...forFiles(testFiles, [ | ||
eslintPluginJest.configs['flat/recommended'], | ||
eslintPluginJest.configs['flat/style'], | ||
]), | ||
eslintConfigPrettier, | ||
{ | ||
linterOptions: { | ||
reportUnusedDisableDirectives: 'error', | ||
}, | ||
languageOptions: { | ||
ecmaVersion: 'latest', | ||
globals: { | ||
...globals.node, | ||
...globals.browser, | ||
}, | ||
}, | ||
rules: { | ||
'import-x/order': ['error', { alphabetize: { order: 'asc' } }], | ||
}, | ||
settings: { | ||
'import-x/resolver': 'typescript', | ||
}, | ||
}, | ||
{ | ||
ignores: [ | ||
'browser.d.ts', | ||
'coverage/**/*', | ||
'lib/**/*', | ||
'node_modules/**/*', | ||
'sandbox/**/*', | ||
'tmp/**/*', | ||
'types/**/*', | ||
], | ||
}, | ||
) |
Oops, something went wrong.