-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update typescript & eslint configuration (#541)
- Loading branch information
1 parent
e9b2034
commit 470f6dc
Showing
7 changed files
with
183 additions
and
163 deletions.
There are no files selected for viewing
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,5 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 |
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 @@ | ||
pnpm exec lint-staged |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# enable-pre-post-scripts: disabled by default(pnpm 8). | ||
enable-pre-post-scripts=true | ||
enable-pre-post-scripts=true |
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 |
---|---|---|
@@ -1,32 +1,41 @@ | ||
import eslint from '@eslint/js'; | ||
import tseslint from 'typescript-eslint'; | ||
import globals from 'globals'; | ||
import prettier from 'eslint-plugin-prettier/recommended'; | ||
// @ts-ignore | ||
import jest from 'eslint-plugin-jest'; | ||
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; | ||
|
||
export default tseslint.config({ | ||
extends: [ | ||
eslint.configs.recommended, | ||
...tseslint.configs.recommendedTypeChecked, | ||
{ | ||
...jest.configs['flat/recommended'] | ||
}, | ||
{ | ||
...jest.configs['flat/style'] | ||
}, | ||
eslintPluginPrettierRecommended | ||
], | ||
languageOptions: { | ||
parserOptions: { | ||
project: ['./packages/*/tsconfig.json'], | ||
tsconfigRootDir: import.meta.dirname | ||
}, | ||
ecmaVersion: 2023, | ||
sourceType: 'commonjs', | ||
globals: { | ||
...globals.node, | ||
...globals.jest | ||
export default tseslint.config( | ||
{ | ||
ignores: ['.prettierrc.js', 'eslint.config.js', 'sample', '**/dist', 'packages/*/*.js'] | ||
}, | ||
eslint.configs.recommended, | ||
...tseslint.configs.recommendedTypeChecked, | ||
...tseslint.configs.stylisticTypeChecked, | ||
{ | ||
files: ['packages/**/test/**', 'packages/**/*.spec.ts'], | ||
...jest.configs['flat/recommended'] | ||
}, | ||
{ | ||
files: ['packages/**/test/**', 'packages/**/*.spec.ts'], | ||
...jest.configs['flat/style'] | ||
}, | ||
prettier, | ||
{ | ||
languageOptions: { | ||
globals: { | ||
...globals.node, | ||
...globals.jest | ||
}, | ||
parserOptions: { | ||
project: ['./packages/*/tsconfig.json'], | ||
tsconfigRootDir: import.meta.dirname | ||
} | ||
} | ||
}, | ||
ignores: ['.prettierrc.js', 'eslint.config.js', '**/dist/**/*'] | ||
}); | ||
{ | ||
linterOptions: { | ||
reportUnusedDisableDirectives: true | ||
} | ||
} | ||
); |
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
Oops, something went wrong.