-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(805): nx and rspack on existing project structure (#847)
* chore(805): nx and rspack on existing project structure --------- Co-authored-by: JohnTParsons <JohnTParsons>
- Loading branch information
1 parent
3a98d96
commit 5e29c58
Showing
29 changed files
with
3,904 additions
and
292 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
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,94 @@ | ||
{ | ||
"root": true, | ||
"ignorePatterns": ["**/*"], | ||
"plugins": ["@nrwl/nx"], | ||
"settings": { | ||
"next": { | ||
"rootDir": "site/" | ||
} | ||
}, | ||
"env": { | ||
"jest": true | ||
}, | ||
"globals": { | ||
"page": true, | ||
"browser": true, | ||
"context": true, | ||
"cy": true, | ||
"Cypress": true, | ||
"window": true | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | ||
"rules": { | ||
"@nrwl/nx/enforce-module-boundaries": "off", | ||
"eslint-comments/no-unused-disable": "off" | ||
} | ||
}, | ||
{ | ||
"files": ["*.tsx"], | ||
"extends": ["plugin:@next/next/recommended"], | ||
"rules": { | ||
"react/prop-types": "off", | ||
"react/forbid-prop-types": "error", | ||
"react-hooks/exhaustive-deps": "warn", | ||
"react/jsx-props-no-spreading": "off", | ||
"react/require-default-props": "off", | ||
|
||
"react/jsx-no-useless-fragment": "off", | ||
"react-hooks/rules-of-hooks": "warn", | ||
"react/display-name": "off", | ||
"react/jsx-key": "off" | ||
} | ||
}, | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"extends": ["plugin:@nrwl/nx/typescript", "plugin:prettier/recommended", "prettier"], | ||
"rules": { | ||
"no-undef": "off", | ||
"no-var": "off", | ||
"no-console": "warn", | ||
"func-names": "warn", | ||
|
||
"@typescript-eslint/ban-types": "off", | ||
"@typescript-eslint/no-empty-function": "off", | ||
"@typescript-eslint/ban-ts-comment": "off", | ||
"@typescript-eslint/no-this-alias": "off", | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"@typescript-eslint/no-empty-interface": "off", | ||
"@typescript-eslint/no-unused-expressions": "warn", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-inferrable-types": "off", | ||
"@typescript-eslint/no-var-require": "off", | ||
"@typescript-eslint/no-var-requires": "off", | ||
|
||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"bracketSpacing": false, | ||
"arrowParens": "avoid" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"files": ["*.js", "*.jsx"], | ||
"extends": ["plugin:@nrwl/nx/javascript"], | ||
"rules": { | ||
"no-undef": "off" | ||
} | ||
}, | ||
{ | ||
"files": ["*.spec.ts", "*.spec.tsx", "*.test.js", "*.test.jsx"], | ||
"env": { | ||
"jest": true | ||
}, | ||
"rules": { | ||
"no-var": "off" | ||
} | ||
} | ||
] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"extends": [ | ||
"plugin:@nrwl/nx/react-typescript", | ||
"plugin:@nrwl/nx/react", | ||
"plugin:storybook/recommended", | ||
"./.eslintrc.base.json" | ||
], | ||
"ignorePatterns": ["!**/*"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.js", "*.jsx"], | ||
"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
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
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
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,16 +1,25 @@ | ||
// These combined settings are now only used by the old-style "yarn test:unit:watch", | ||
// as the nx-based test commands use a separate coverage folder per project | ||
module.exports = { | ||
projects: ['<rootDir>/src/jest.config.js', '<rootDir>/site/jest.config.js'], | ||
coveragePathIgnorePatterns: ['/node_modules/', '<rootDir>/test'], | ||
coverageReporters: ['lcov', 'text-summary'], | ||
collectCoverage: true, | ||
coverageDirectory: './coverage', | ||
coverageThreshold: { | ||
'src/**': { | ||
branches: 100, | ||
functions: 100, | ||
lines: 100, | ||
statements: 100, | ||
}, | ||
}, | ||
coverageDirectory: './coverage/all', | ||
snapshotSerializers: ['@emotion/jest/serializer'], | ||
preset: './jest.preset.js', | ||
transform: { | ||
'^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nrwl/react/plugins/jest', | ||
'^.+\\.[tj]sx?$': ['babel-jest', {presets: ['@nrwl/react/babel']}], | ||
}, | ||
setupFilesAfterEnv: [ | ||
'<rootDir>/src/test/test-framework-setup.ts', | ||
'@testing-library/jest-dom/extend-expect', | ||
], | ||
testEnvironment: 'jsdom', | ||
testPathIgnorePatterns: ['/node_modules/', '/dist/', '/src/theme-checker/'], | ||
testEnvironmentOptions: { | ||
url: 'http://localhost/', | ||
}, | ||
workerIdleMemoryLimit: 0.4, | ||
}; |
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,3 @@ | ||
const nxPreset = require('@nrwl/jest/preset').default; | ||
|
||
module.exports = {...nxPreset}; |
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,20 @@ | ||
{ | ||
"tasksRunnerOptions": { | ||
"default": { | ||
"runner": "nx/tasks-runners/default", | ||
"options": { | ||
"cacheableOperations": [ | ||
"lint:code:comps", | ||
"lint:code:docs", | ||
"lint:code", | ||
"lint:markdown", | ||
"lint:next", | ||
"test:unit:run", | ||
"test:unit:comps", | ||
"test:unit:docs" | ||
] | ||
} | ||
} | ||
}, | ||
"defaultBase": "main" | ||
} |
Oops, something went wrong.