generated from xgeekshq/oss-template
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SUGGESTION]: Use
src/
folder on frontend (#219)
* feat: suggestion of src folder structure * fix: update tsconfig * fix: eslint config and require * fix: eslint config and require * fix: jest tests * fix: solve merge conflits * fix: package.json versions
- Loading branch information
Showing
267 changed files
with
6,373 additions
and
2,141 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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
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,3 +1,5 @@ | ||
# .eslintrc.js | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
|
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,101 @@ | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const fs = require('fs'); | ||
|
||
const folders = fs | ||
.readdirSync('src', { withFileTypes: true }) | ||
.filter((dirent) => dirent.isDirectory()) | ||
.map((dirent) => !['styles'].includes(dirent.name) && dirent.name); | ||
|
||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true | ||
}, | ||
extends: [ | ||
'plugin:react/recommended', | ||
'airbnb', | ||
'airbnb-typescript', | ||
'prettier', | ||
'airbnb-typescript-prettier' | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true | ||
}, | ||
ecmaVersion: 12, | ||
sourceType: 'module', | ||
extraFileExtensions: ['.css'], | ||
project: './tsconfig.json' | ||
}, | ||
plugins: [ | ||
'react', | ||
'@typescript-eslint', | ||
'simple-import-sort', | ||
'import', | ||
'unused-imports', | ||
'prettier' | ||
], | ||
rules: { | ||
'react/react-in-jsx-scope': 'off', | ||
'react/jsx-filename-extension': [ | ||
1, | ||
{ | ||
extensions: ['.ts', '.tsx'] | ||
} | ||
], | ||
'react/jsx-props-no-spreading': 'off', | ||
'no-underscore-dangle': 'off', | ||
'no-param-reassign': 'off', | ||
'react/function-component-definition': 'off', | ||
'@typescript-eslint/no-empty-interface': 'off', | ||
'import/prefer-default-export': 'off', | ||
'import/no-cycle': 'off', | ||
'no-plusplus': 'off', | ||
'no-useless-escape': 'off', | ||
'no-restricted-exports': 'off', | ||
'jsx-a11y/anchor-is-valid': [ | ||
'error', | ||
{ | ||
components: ['Link'], | ||
specialLink: ['hrefLeft', 'hrefRight'], | ||
aspects: ['invalidHref', 'preferButton'] | ||
} | ||
], | ||
'simple-import-sort/imports': 'error', | ||
'simple-import-sort/exports': 'error', | ||
'import/first': 'error', | ||
'import/newline-after-import': 'error', | ||
'import/no-duplicates': 'error', | ||
'unused-imports/no-unused-imports': 'error', | ||
'prettier/prettier': ['error', { usePrettierrc: true }] | ||
}, | ||
settings: { | ||
'import/resolver': { | ||
node: { | ||
extensions: ['.js', '.jsx', '.ts', '.tsx'], | ||
moduleDirectory: ['node_modules', 'src/'] | ||
} | ||
} | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['**/*.ts?(x)'], | ||
rules: { | ||
'simple-import-sort/imports': [ | ||
'error', | ||
{ | ||
groups: [ | ||
// Packages. `react` related packages come first. | ||
// Things that start with a letter (or digit or underscore), or `@` followed by a letter. | ||
['^react', '^next', '^recoil', '^@?\\w'], // Absolute imports and Relative imports. | ||
['^styles'], | ||
[`^(${folders.join('|')})(/.*|$)`, '^\\.'], // for scss imports. | ||
['^[^.]'] | ||
] | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}; |
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
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,22 +1,22 @@ | ||
{ | ||
"tabWidth": 4, | ||
"useTabs": true, | ||
"singleQuote": true, | ||
"printWidth": 100, | ||
"semi": true, | ||
"trailingComma": "none", | ||
"overrides": [ | ||
{ | ||
"files": [ | ||
"*.yml", | ||
"*.yaml", | ||
"**/*.yml", | ||
"**/*.yaml" | ||
], | ||
"options": { | ||
"tabWidth": 2, | ||
"useTabs": false | ||
} | ||
} | ||
] | ||
"tabWidth": 4, | ||
"useTabs": true, | ||
"singleQuote": true, | ||
"printWidth": 100, | ||
"semi": true, | ||
"trailingComma": "none", | ||
"overrides": [ | ||
{ | ||
"files": [ | ||
"*.yml", | ||
"*.yaml", | ||
"**/*.yml", | ||
"**/*.yaml" | ||
], | ||
"options": { | ||
"tabWidth": 2, | ||
"useTabs": false | ||
} | ||
} | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
frontend/components/CreateBoard/fake/FakeSettingsTabs/partials/TeamTab/styles.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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 +1 @@ | ||
import "@testing-library/jest-dom/extend-expect"; | ||
import '@testing-library/jest-dom/extend-expect'; |
Oops, something went wrong.