-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update deps and migrate ESLint config
- Loading branch information
Showing
38 changed files
with
1,649 additions
and
1,490 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,3 +39,4 @@ testem.log | |
Thumbs.db | ||
|
||
.nx/cache | ||
.nx/workspace-data |
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 |
---|---|---|
|
@@ -3,3 +3,5 @@ | |
/coverage | ||
/.nx/cache | ||
CHANGELOG.md | ||
|
||
/.nx/workspace-data |
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,76 @@ | ||
const { FlatCompat } = require('@eslint/eslintrc'); | ||
const js = require('@eslint/js'); | ||
const nxEslintPlugin = require('@nx/eslint-plugin'); | ||
|
||
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
recommendedConfig: js.configs.recommended, | ||
}); | ||
|
||
module.exports = [ | ||
{ plugins: { '@nx': nxEslintPlugin } }, | ||
...compat | ||
.config({ plugins: ['unused-imports', 'simple-import-sort'] }) | ||
.map((config) => ({ | ||
...config, | ||
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'], | ||
rules: { | ||
...config.rules, | ||
'@nx/enforce-module-boundaries': [ | ||
'error', | ||
{ | ||
enforceBuildableLibDependency: true, | ||
banTransitiveDependencies: true, | ||
allow: [], | ||
depConstraints: [ | ||
{ | ||
sourceTag: '*', | ||
onlyDependOnLibsWithTags: ['*'], | ||
}, | ||
], | ||
}, | ||
], | ||
'no-duplicate-imports': 'error', | ||
'no-empty': 'error', | ||
'no-fallthrough': 'error', | ||
'no-param-reassign': 'error', | ||
'no-unreachable': 'error', | ||
'no-unreachable-loop': 'error', | ||
'no-var': 'error', | ||
'prefer-const': 'error', | ||
'no-return-await': 'error', | ||
'require-await': 'error', | ||
'require-yield': 'error', | ||
'simple-import-sort/imports': [ | ||
'error', | ||
{ groups: [['^\\u0000'], ['^@?\\w'], ['^'], ['^\\.']] }, | ||
], | ||
'simple-import-sort/exports': 'error', | ||
}, | ||
})), | ||
...compat.config({ extends: ['plugin:@nx/typescript'] }).map((config) => ({ | ||
...config, | ||
files: ['**/*.ts', '**/*.tsx'], | ||
rules: { | ||
...config.rules, | ||
'@typescript-eslint/no-extra-semi': 'error', | ||
'no-extra-semi': 'off', | ||
}, | ||
})), | ||
...compat.config({ extends: ['plugin:@nx/javascript'] }).map((config) => ({ | ||
...config, | ||
files: ['**/*.js', '**/*.jsx'], | ||
rules: { | ||
...config.rules, | ||
'@typescript-eslint/no-extra-semi': 'error', | ||
'no-extra-semi': 'off', | ||
}, | ||
})), | ||
...compat.config({ env: { jest: true } }).map((config) => ({ | ||
...config, | ||
files: ['**/*.spec.ts', '**/*.spec.tsx', '**/*.spec.js', '**/*.spec.jsx'], | ||
rules: { | ||
...config.rules, | ||
}, | ||
})), | ||
]; |
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,5 +1,5 @@ | ||
import { getJestProjects } from '@nx/jest'; | ||
import { getJestProjectsAsync } from '@nx/jest'; | ||
|
||
export default { | ||
projects: getJestProjects(), | ||
}; | ||
export default async () => ({ | ||
projects: await getJestProjectsAsync(), | ||
}); |
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,51 @@ | ||
{ | ||
"migrations": [ | ||
{ | ||
"cli": "nx", | ||
"version": "19.2.0-beta.2", | ||
"description": "Updates the default workspace data directory to .nx/workspace-data", | ||
"implementation": "./src/migrations/update-19-2-0/move-workspace-data-directory", | ||
"package": "nx", | ||
"name": "19-2-0-move-graph-cache-directory" | ||
}, | ||
{ | ||
"cli": "nx", | ||
"version": "19.2.2-beta.0", | ||
"description": "Updates the nx wrapper.", | ||
"implementation": "./src/migrations/update-17-3-0/update-nxw", | ||
"package": "nx", | ||
"name": "19-2-2-update-nx-wrapper" | ||
}, | ||
{ | ||
"version": "19.2.4-beta.0", | ||
"description": "Set project name in nx.json explicitly", | ||
"implementation": "./src/migrations/update-19-2-4/set-project-name", | ||
"x-repair-skip": true, | ||
"package": "nx", | ||
"name": "19-2-4-set-project-name" | ||
}, | ||
{ | ||
"version": "20.0.0-beta.7", | ||
"description": "Migration for v20.0.0-beta.7", | ||
"implementation": "./src/migrations/update-20-0-0/move-use-daemon-process", | ||
"package": "nx", | ||
"name": "move-use-daemon-process" | ||
}, | ||
{ | ||
"cli": "nx", | ||
"version": "19.1.0-beta.6", | ||
"description": "Migrate no-extra-semi rules into user config, out of nx extendable configs", | ||
"implementation": "./src/migrations/update-19-1-0-migrate-no-extra-semi/migrate-no-extra-semi", | ||
"package": "@nx/eslint-plugin", | ||
"name": "update-19-1-0-rename-no-extra-semi" | ||
}, | ||
{ | ||
"cli": "nx", | ||
"version": "20.0.0-beta.5", | ||
"description": "replace getJestProjects with getJestProjectsAsync", | ||
"implementation": "./src/migrations/update-20-0-0/replace-getJestProjects-with-getJestProjectsAsync", | ||
"package": "@nx/jest", | ||
"name": "replace-getJestProjects-with-getJestProjectsAsync" | ||
} | ||
] | ||
} |
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.