Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
morewings committed May 17, 2024
1 parent 4309981 commit cd44270
Show file tree
Hide file tree
Showing 3 changed files with 140 additions and 129 deletions.
27 changes: 23 additions & 4 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ module.exports = {
'import/order': [
'error',
{
groups: ['builtin', 'external', 'internal', ['parent', 'sibling', 'index']],
groups: [
'builtin',
'external',
'internal',
['parent', 'sibling', 'index'],
],
pathGroups: [
{
pattern: '@/**',
Expand Down Expand Up @@ -103,7 +108,13 @@ module.exports = {
},
/* Allow devDependencies imports for tests and config files */
{
files: ['**/*.spec.*', '**/testUtils/*.*', '**/*.js', '**/*.cjs', '**/setupTests.ts'],
files: [
'**/*.spec.*',
'**/testUtils/*.*',
'**/*.js',
'**/*.cjs',
'**/setupTests.ts',
],
rules: {
'import/no-extraneous-dependencies': [
'error',
Expand All @@ -124,7 +135,8 @@ module.exports = {
patterns: [
{
group: ['**/templates/**'],
message: 'Imports from templates directory are forbidden.',
message:
'Imports from templates directory are forbidden.',
},
],
},
Expand All @@ -133,7 +145,14 @@ module.exports = {
},
/* Allow devDependencies imports for tests and config files */
{
files: ['**/*.spec.*', '**/testUtils/*.*', '**/*.js', '**/*.cjs', 'jest.config.cjs', '**/setupTests.ts'],
files: [
'**/*.spec.*',
'**/testUtils/*.*',
'**/*.js',
'**/*.cjs',
'jest.config.cjs',
'**/setupTests.ts',
],
rules: {
'import/no-extraneous-dependencies': [
'error',
Expand Down
152 changes: 76 additions & 76 deletions generate-react-cli.json
Original file line number Diff line number Diff line change
@@ -1,79 +1,79 @@
{
"usesTypeScript": true,
"usesCssModule": true,
"cssPreprocessor": "css",
"testLibrary": "Testing Library",
"usesStyledComponents": false,
"component": {
"default": {
"path": "src/components",
"withLazy": false,
"withStory": false,
"withStyle": true,
"withTest": true,
"withIndex": true,
"withMdx": false,
"withHook": false,
"withHookTest": false,
"customTemplates": {
"component": "templates/Component/TemplateName.tsx",
"style": "templates/Component/TemplateName.module.css",
"index": "templates/Component/index.ts",
"test": "templates/Component/TemplateName.spec.tsx"
}
},
"loading": {
"path": "src/components",
"withLazy": false,
"withStory": false,
"withStyle": true,
"withTest": true,
"withIndex": true,
"withMdx": false,
"withHook": false,
"withHookTest": false,
"customTemplates": {
"component": "templates/Loading/TemplateName.tsx",
"style": "templates/Loading/TemplateName.module.css",
"index": "templates/Loading/index.ts",
"test": "templates/Loading/TemplateName.spec.tsx"
}
},
"feature": {
"path": "src/features",
"withActionTypes": true,
"withIndex": true,
"withReadme": true,
"withSelectorsTest": true,
"withSelectors": true,
"withReducerTest": true,
"withQueryTest": true,
"withquery": true,
"customTemplates": {
"component": "templates/Feature/TemplateNameReducer.ts",
"actionTypes": "templates/Feature/actionTypes.ts",
"index": "templates/Feature/index.ts",
"readme": "templates/Feature/README.md",
"selectorsTest": "templates/Feature/selectors.spec.tsx",
"selectors": "templates/Feature/selectors.ts",
"reducerTest": "templates/Feature/TemplateNameReducer.spec.tsx",
"queryTest": "templates/Feature/useGetTemplateNameQuery.spec.tsx",
"query": "templates/Feature/useGetTemplateNameQuery.ts"
}
},
"page": {
"path": "app",
"withLazy": false,
"withStory": false,
"withStyle": false,
"withTest": false,
"withIndex": false,
"withMdx": false,
"withHook": false,
"withHookTest": false,
"customTemplates": {
"component": "templates/Page/page.tsx"
}
"usesTypeScript": true,
"usesCssModule": true,
"cssPreprocessor": "css",
"testLibrary": "Testing Library",
"usesStyledComponents": false,
"component": {
"default": {
"path": "src/components",
"withLazy": false,
"withStory": false,
"withStyle": true,
"withTest": true,
"withIndex": true,
"withMdx": false,
"withHook": false,
"withHookTest": false,
"customTemplates": {
"component": "templates/Component/TemplateName.tsx",
"style": "templates/Component/TemplateName.module.css",
"index": "templates/Component/index.ts",
"test": "templates/Component/TemplateName.spec.tsx"
}
},
"loading": {
"path": "src/components",
"withLazy": false,
"withStory": false,
"withStyle": true,
"withTest": true,
"withIndex": true,
"withMdx": false,
"withHook": false,
"withHookTest": false,
"customTemplates": {
"component": "templates/Loading/TemplateName.tsx",
"style": "templates/Loading/TemplateName.module.css",
"index": "templates/Loading/index.ts",
"test": "templates/Loading/TemplateName.spec.tsx"
}
},
"feature": {
"path": "src/features",
"withActionTypes": true,
"withIndex": true,
"withReadme": true,
"withSelectorsTest": true,
"withSelectors": true,
"withReducerTest": true,
"withQueryTest": true,
"withquery": true,
"customTemplates": {
"component": "templates/Feature/TemplateNameReducer.ts",
"actionTypes": "templates/Feature/actionTypes.ts",
"index": "templates/Feature/index.ts",
"readme": "templates/Feature/README.md",
"selectorsTest": "templates/Feature/selectors.spec.tsx",
"selectors": "templates/Feature/selectors.ts",
"reducerTest": "templates/Feature/TemplateNameReducer.spec.tsx",
"queryTest": "templates/Feature/useGetTemplateNameQuery.spec.tsx",
"query": "templates/Feature/useGetTemplateNameQuery.ts"
}
},
"page": {
"path": "app",
"withLazy": false,
"withStory": false,
"withStyle": false,
"withTest": false,
"withIndex": false,
"withMdx": false,
"withHook": false,
"withHookTest": false,
"customTemplates": {
"component": "templates/Page/page.tsx"
}
}
}
}
}
90 changes: 41 additions & 49 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,52 +1,44 @@
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"baseUrl": ".",
"paths": {
"@/*": [
"./*"
]
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"baseUrl": ".",
"paths": {
"@/*": ["./*"]
},
"plugins": [
{
"name": "next"
}
]
},
"plugins": [
{
"name": "next"
}
]
},
"include": [
"next-env.d.ts",
"additional.d.ts",
"**/*.ts",
"**/*.tsx",
"**/*.stories.tsx",
"**/*.stories.ts",
"*.config.ts",
"src",
"app",
".eslintrc.cjs",
"templates/**/*.ts",
"templates/**/*.tsx",
"build/types/**/*.ts",
".next/types/**/*.ts"
],
"exclude": [
"node_modules"
]
"include": [
"next-env.d.ts",
"additional.d.ts",
"**/*.ts",
"**/*.tsx",
"**/*.stories.tsx",
"**/*.stories.ts",
"*.config.ts",
"src",
"app",
".eslintrc.cjs",
"templates/**/*.ts",
"templates/**/*.tsx",
"build/types/**/*.ts",
".next/types/**/*.ts"
],
"exclude": ["node_modules"]
}

0 comments on commit cd44270

Please sign in to comment.