-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(805): nx and rspack on existing project structure #847
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
411ef34
chore(805): nx and rspack on existing project structure
e77367a
chore(805): add rspack config
3941dd8
chore(805): attempt to speed up lint
77c22e9
chore(805): attempt to speed up lint
8297a1c
chore(805): attempt to speed up lint
02c4a01
chore(805): attempt to speed up lint
54e9f26
chore(805): legacy lint fixes
ed01abe
chore(805): test-utils.tsx no longer needs ignoring
d1abe14
chore(805): fix watch command
2d70fff
chore(805): attempt to fix test:unit:ci crash
c6ea1ca
chore(805): attempt to fix test:unit:ci crash
6d5f2c5
chore(805): remove unnecessary window-based applyAsyncStyling test
b8c1470
chore(805): attempt to fix test:unit:ci crash
b20471c
chore(805): attempt to fix test:unit:ci crash
fd2a7b2
chore(805): try test:unit:comps on ci
23b76b4
chore(805): try test:unit:comps rspack on ci
7ef67d3
chore(805): add experimental test commands
28cd593
chore(805): remove experimental steps from circle config
a2af225
chore(805): restore eslint caching & some legacy lint/test commands
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these required?