-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract logic to monorepo packages: UI package, "client-hints" packag…
…e, and config (tsconfig, eslint) packages. (#3) With this commit we begin to extract some logic from the epic-stack app into their own packages. * Add @epic-stack-monorepo/ui package containing Components and utilities that were present in the APP before. This package also contains the icons build step. This package has a tsup build step but we are actually exporting ts source files directly, Remix will compile it. * Add @epic-stack-monorepo/client-hints package containing the logic of client hints that was previously in the utils folder. * Add config packages for eslint and tsconfig.
- Loading branch information
Showing
126 changed files
with
3,219 additions
and
661 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
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,85 +1 @@ | ||
const vitestFiles = ['app/**/__tests__/**/*', 'app/**/*.{spec,test}.*'] | ||
const testFiles = ['**/tests/**', ...vitestFiles] | ||
const appFiles = ['app/**'] | ||
|
||
/** @type {import('@types/eslint').Linter.BaseConfig} */ | ||
module.exports = { | ||
extends: [ | ||
'@remix-run/eslint-config', | ||
'@remix-run/eslint-config/node', | ||
'prettier', | ||
], | ||
rules: { | ||
// playwright requires destructuring in fixtures even if you don't use anything 🤷♂️ | ||
'no-empty-pattern': 'off', | ||
'@typescript-eslint/consistent-type-imports': [ | ||
'warn', | ||
{ | ||
prefer: 'type-imports', | ||
disallowTypeAnnotations: true, | ||
fixStyle: 'inline-type-imports', | ||
}, | ||
], | ||
'import/no-duplicates': ['warn', { 'prefer-inline': true }], | ||
'import/consistent-type-specifier-style': ['warn', 'prefer-inline'], | ||
'import/order': [ | ||
'warn', | ||
{ | ||
alphabetize: { order: 'asc', caseInsensitive: true }, | ||
groups: [ | ||
'builtin', | ||
'external', | ||
'internal', | ||
'parent', | ||
'sibling', | ||
'index', | ||
], | ||
}, | ||
], | ||
}, | ||
overrides: [ | ||
{ | ||
plugins: ['remix-react-routes'], | ||
files: appFiles, | ||
excludedFiles: testFiles, | ||
rules: { | ||
'remix-react-routes/use-link-for-routes': 'error', | ||
'remix-react-routes/require-valid-paths': 'error', | ||
// disable this one because it doesn't appear to work with our | ||
// route convention. Someone should dig deeper into this... | ||
'remix-react-routes/no-relative-paths': [ | ||
'off', | ||
{ allowLinksToSelf: true }, | ||
], | ||
'remix-react-routes/no-urls': 'error', | ||
'no-restricted-imports': [ | ||
'error', | ||
{ | ||
patterns: [ | ||
{ | ||
group: testFiles, | ||
message: 'Do not import test files in app files', | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
}, | ||
{ | ||
extends: ['@remix-run/eslint-config/jest-testing-library'], | ||
files: vitestFiles, | ||
rules: { | ||
'testing-library/no-await-sync-events': 'off', | ||
'jest-dom/prefer-in-document': 'off', | ||
}, | ||
// we're using vitest which has a very similar API to jest | ||
// (so the linting plugins work nicely), but it means we have to explicitly | ||
// set the jest version. | ||
settings: { | ||
jest: { | ||
version: 28, | ||
}, | ||
}, | ||
}, | ||
], | ||
} | ||
module.exports = require('@epic-stack-monorepo/eslint-config/remix.cjs') |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.