Skip to content

Commit

Permalink
stash
Browse files Browse the repository at this point in the history
  • Loading branch information
MajorLift committed Sep 24, 2024
1 parent 86311e7 commit d00968a
Show file tree
Hide file tree
Showing 3 changed files with 179 additions and 118 deletions.
58 changes: 34 additions & 24 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,44 @@ const config = tseslint.config({
},
{
files: ['*.test.{ts,js}', '**/tests/**/*.{ts,js}'],
extends: jest,
extends: [...jest, ...typescript],
languageOptions: {
sourceType: 'module',
},
},
{
files: ['*.d.ts'],
rules: {
'@typescript-eslint/naming-convention': 'warn',
'import/unambiguous': 'off',
},
},
{
files: ['scripts/*.ts'],
extends: nodejs,
languageOptions: {
sourceType: 'module',
parserOptions: {
project: ['./scripts/*/tsconfig.json'],
},
},
rules: {
// All scripts will have shebangs.
'n/shebang': 'off',
},
},
{
// These files are test helpers, not tests. We still use the Jest ESLint
// config here to ensure that ESLint expects a test-like environment, but
// various rules meant just to apply to tests have been disabled.
files: ['**/tests/**/*.{ts,js}', '!*.test.{ts,js}'],
languageOptions: {
sourceType: 'module',
parserOptions: {
tsconfigRootDir: import.meta.dirname,
project: ['./packages/*/tsconfig.json'],
},
},
rules: {
'jest/no-export': 'off',
'jest/require-top-level-describe': 'off',
Expand All @@ -85,16 +116,16 @@ const config = tseslint.config({
languageOptions: {
parserOptions: {
sourceType: 'script',
ecmaVersion: '2020',
ecmaVersion: 2020,
},
},
},
{
files: ['*.ts'],
extends: typescript,
languageOptions: {
sourceType: 'module',
parserOptions: {
sourceType: 'module',
tsconfigRootDir: import.meta.dirname,
project: ['./packages/*/tsconfig.json'],
},
Expand All @@ -119,32 +150,11 @@ const config = tseslint.config({
},
{
files: ['tests/setupAfterEnv/matchers.ts'],
languageOptions: {
parserOptions: {
sourceType: 'script',
},
},
},
{
files: ['*.d.ts'],
rules: {
'@typescript-eslint/naming-convention': 'warn',
'import/unambiguous': 'off',
},
},
{
files: ['scripts/*.ts'],
extends: nodejs,
languageOptions: {
parserOptions: {
sourceType: 'module',
project: ['./scripts/*/tsconfig.json'],
},
},
rules: {
// All scripts will have shebangs.
'n/shebang': 'off',
},
},
{
files: ['**/jest.environment.js'],
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@
"@types/lodash": "^4.14.191",
"@types/node": "^16.18.54",
"@types/semver": "^7",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"@typescript-eslint/eslint-plugin": "^8.7.0",
"@typescript-eslint/parser": "^8.7.0",
"@yarnpkg/types": "^4.0.0",
"babel-jest": "^27.5.1",
"babel-jest": "^29.7.0",
"depcheck": "^1.4.7",
"eslint": "^9.11.0",
"eslint-config-prettier": "^9.1.0",
Expand Down
Loading

0 comments on commit d00968a

Please sign in to comment.