Skip to content

Commit

Permalink
chore: align eslint / vitest configs
Browse files Browse the repository at this point in the history
  • Loading branch information
belgattitude committed Sep 17, 2024
1 parent f453277 commit 8661f08
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 82 deletions.
4 changes: 2 additions & 2 deletions examples/nextjs-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"devDependencies": {
"@belgattitude/eslint-config-bases": "6.0.0-canary.9",
"@types/node": "22.5.5",
"@types/react": "18.3.6",
"@types/react": "18.3.7",
"@types/react-dom": "18.3.0",
"@vitejs/plugin-react-swc": "3.7.0",
"@vitest/coverage-v8": "2.1.1",
Expand All @@ -52,7 +52,7 @@
"happy-dom": "15.7.4",
"postcss": "8.4.47",
"rimraf": "6.0.1",
"tailwindcss": "3.4.11",
"tailwindcss": "3.4.12",
"typescript": "5.6.2",
"vite": "5.4.6",
"vite-plugin-svgr": "4.2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/nextjs-app/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default defineConfig({
},
// threads is good, vmThreads is faster (perf++) but comes with possible memory leaks
// @link https://vitest.dev/config/#vmthreads
pool: 'threads',
pool: 'forks',
poolOptions: {
vmThreads: {
// useAtomics -> perf+
Expand Down
2 changes: 1 addition & 1 deletion integrations/prisma-exception/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default defineConfig({
typecheck: {
enabled: false,
},
pool: 'vmThreads',
pool: 'forks',
poolOptions: {
vmThreads: {
// useAtomics: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/assert/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ module.exports = {
peerDependencies: false,
},
],
'import-x/no-cycle': [1, { maxDepth: 100 }],
'import-x/no-cycle': [1, { maxDepth: 5 }],
'import-x/no-nodejs-modules': 'error',
'import-x/no-self-import': 'error',
},
Expand Down
2 changes: 1 addition & 1 deletion packages/dsn-parser/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module.exports = {
peerDependencies: false,
},
],
'import-x/no-cycle': [1, { maxDepth: 100 }],
'import-x/no-cycle': [1, { maxDepth: 5 }],
'import-x/no-nodejs-modules': 'error',
'import-x/no-self-import': 'error',
},
Expand Down
31 changes: 3 additions & 28 deletions packages/exception/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,17 @@ module.exports = {
],
overrides: [
{
files: ['**/*.ts'],
files: ['src/**/*.ts'],
rules: {
'import-x/no-extraneous-dependencies': [
'error',
{
devDependencies: [
'**/*.test.ts',
'**/*.spec.ts',
'**/*.config.js',
'**/*.config.mjs',
'**/*.config.cjs',
'**/*.config.ts',
'**/*.d.ts',
'.eslint*.*',
],
devDependencies: ['**/*.test.ts', '**/*.spec.ts'],
optionalDependencies: false,
peerDependencies: false,
},
],
'import-x/no-cycle': [1, { maxDepth: 100 }],
'import-x/no-cycle': [1, { maxDepth: 5 }],
'import-x/no-nodejs-modules': 'error',
'import-x/no-self-import': 'error',
},
Expand All @@ -64,20 +55,4 @@ module.exports = {
tsconfigRootDir: __dirname,
},
root: true,
rules: {
'import-x/no-self-import': 'error',
'jest/no-restricted-matchers': [
'error',
{
toBeFalsy: null,
resolves: 'Use `expect(await promise)` instead.',
toHaveBeenCalledWith: null,
'not.toHaveBeenCalledWith': null,
'resolves.toHaveBeenCalledWith': null,
'rejects.toHaveBeenCalledWith': null,
'resolves.not.toHaveBeenCalledWith': null,
'rejects.not.toHaveBeenCalledWith': null,
},
],
},
};
4 changes: 2 additions & 2 deletions packages/exception/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default defineConfig({
deps: {
optimizer: {
web: {
enabled: false,
enabled: true,
},
ssr: { enabled: true },
},
Expand All @@ -31,7 +31,7 @@ export default defineConfig({
},
// threads is good, vmThreads is faster (perf++) but comes with limitations
// @link https://vitest.dev/config/#vmthreads
pool: 'threads',
pool: 'forks',
poolOptions: {
vmThreads: {
// useAtomics -> perf+
Expand Down
2 changes: 1 addition & 1 deletion packages/json-api/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module.exports = {
peerDependencies: false,
},
],
'import-x/no-cycle': [1, { maxDepth: 100 }],
'import-x/no-cycle': [1, { maxDepth: 5 }],
'import-x/no-nodejs-modules': 'error',
'import-x/no-self-import': 'error',
},
Expand Down
2 changes: 1 addition & 1 deletion packages/memo-intl/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module.exports = {
peerDependencies: false,
},
],
'import-x/no-cycle': [1, { maxDepth: 100 }],
'import-x/no-cycle': [1, { maxDepth: 5 }],
'import-x/no-nodejs-modules': 'error',
'import-x/no-self-import': 'error',
},
Expand Down
7 changes: 2 additions & 5 deletions packages/plain-object/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module.exports = {
peerDependencies: false,
},
],
'import-x/no-cycle': [1, { maxDepth: 100 }],
'import-x/no-cycle': [1, { maxDepth: 5 }],
'import-x/no-nodejs-modules': 'error',
'import-x/no-self-import': 'error',
},
Expand All @@ -56,8 +56,5 @@ module.exports = {
tsconfigRootDir: __dirname,
},
root: true,
rules: {
'sonarjs/cognitive-complexity': ['error', 17],
'unicorn/no-array-reduce': 'off',
},
rules: {},
};
45 changes: 6 additions & 39 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2616,7 +2616,7 @@ __metadata:
"@httpx/plain-object": "workspace:^"
"@httpx/treeu": "workspace:^"
"@types/node": "npm:22.5.5"
"@types/react": "npm:18.3.6"
"@types/react": "npm:18.3.7"
"@types/react-dom": "npm:18.3.0"
"@vitejs/plugin-react-swc": "npm:3.7.0"
"@vitest/coverage-v8": "npm:2.1.1"
Expand All @@ -2638,7 +2638,7 @@ __metadata:
rimraf: "npm:6.0.1"
superjson: "npm:2.2.1"
tailwind-merge: "npm:2.5.2"
tailwindcss: "npm:3.4.11"
tailwindcss: "npm:3.4.12"
typescript: "npm:5.6.2"
vite: "npm:5.4.6"
vite-plugin-svgr: "npm:4.2.0"
Expand Down Expand Up @@ -4526,13 +4526,13 @@ __metadata:
languageName: node
linkType: hard

"@types/react@npm:*, @types/react@npm:18.3.6, @types/react@npm:>=16":
version: 18.3.6
resolution: "@types/react@npm:18.3.6"
"@types/react@npm:*, @types/react@npm:18.3.7, @types/react@npm:>=16":
version: 18.3.7
resolution: "@types/react@npm:18.3.7"
dependencies:
"@types/prop-types": "npm:*"
csstype: "npm:^3.0.2"
checksum: 10c0/e347787a496f2006fe61358316e040c22548a1669559277b72dad39e2f1f713080115be9fe6c30f9d1d28a54054b96cf6c06471be6967a3605e31f5b84a6cec7
checksum: 10c0/460f40eadf1fd035344b2ff9061d5c2314db9403f76d05fff7724c78543737c95829e1628567c63d27b542647867eca5b6f284dfd38f1d3b70754f32c4cbecb7
languageName: node
linkType: hard

Expand Down Expand Up @@ -15986,39 +15986,6 @@ __metadata:
languageName: node
linkType: hard

"tailwindcss@npm:3.4.11":
version: 3.4.11
resolution: "tailwindcss@npm:3.4.11"
dependencies:
"@alloc/quick-lru": "npm:^5.2.0"
arg: "npm:^5.0.2"
chokidar: "npm:^3.5.3"
didyoumean: "npm:^1.2.2"
dlv: "npm:^1.1.3"
fast-glob: "npm:^3.3.0"
glob-parent: "npm:^6.0.2"
is-glob: "npm:^4.0.3"
jiti: "npm:^1.21.0"
lilconfig: "npm:^2.1.0"
micromatch: "npm:^4.0.5"
normalize-path: "npm:^3.0.0"
object-hash: "npm:^3.0.0"
picocolors: "npm:^1.0.0"
postcss: "npm:^8.4.23"
postcss-import: "npm:^15.1.0"
postcss-js: "npm:^4.0.1"
postcss-load-config: "npm:^4.0.1"
postcss-nested: "npm:^6.0.1"
postcss-selector-parser: "npm:^6.0.11"
resolve: "npm:^1.22.2"
sucrase: "npm:^3.32.0"
bin:
tailwind: lib/cli.js
tailwindcss: lib/cli.js
checksum: 10c0/b5bce27a6370e7a1c68a8c61db1e5379ccd14dcc5410149342f7742f45be0f2af72cbc0f3ac4e97535fc214d3f2546ade5edbb737f5b74d0a2431b8bb8e54b0d
languageName: node
linkType: hard

"tailwindcss@npm:3.4.12":
version: 3.4.12
resolution: "tailwindcss@npm:3.4.12"
Expand Down

0 comments on commit 8661f08

Please sign in to comment.