-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #258 from TogetherCrew/feat/refactor-old-codes
Feat/refactor old codes
- Loading branch information
Showing
249 changed files
with
4,017 additions
and
3,374 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,81 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true | ||
es2021: true, | ||
node: true, | ||
}, | ||
plugins: ['@typescript-eslint', 'simple-import-sort', 'unused-imports'], | ||
extends: [ | ||
'plugin:react/recommended', | ||
'standard-with-typescript' | ||
], | ||
overrides: [ | ||
], | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module' | ||
}, | ||
plugins: [ | ||
'react' | ||
'eslint:recommended', | ||
'next', | ||
'next/core-web-vitals', | ||
'plugin:@typescript-eslint/recommended', | ||
'prettier', | ||
], | ||
rules: { | ||
} | ||
} | ||
'no-unused-vars': 'off', // Disabling base rule as it's handled by @typescript-eslint/no-unused-vars | ||
'no-console': 'warn', // Allow console with warning to identify usage | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', // Disabling requirement for explicit return types on functions | ||
'react/no-unescaped-entities': 'off', // Disable warnings for unescaped entities in JSX | ||
'react/display-name': 'off', // Disable display name rule for React components | ||
'react/jsx-curly-brace-presence': [ | ||
'warn', | ||
{ props: 'never', children: 'never' }, | ||
], // Enforce no unnecessary curly braces in JSX | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/ban-types': 'off', | ||
'no-empty': 'off', | ||
'no-fallthrough': 'off', | ||
'react/jsx-key': 'warn', | ||
'react/no-children-prop': 'off', | ||
'no-prototype-builtins': 'warn', | ||
'no-case-declarations': 'warn', | ||
'react-hooks/exhaustive-deps': 'off', | ||
|
||
// Disable rule for unused vars but enable warning for unused imports and vars with specific patterns | ||
'@typescript-eslint/no-unused-vars': 'off', | ||
'unused-imports/no-unused-imports': 'warn', | ||
'unused-imports/no-unused-vars': [ | ||
'warn', | ||
{ | ||
vars: 'all', | ||
varsIgnorePattern: '^_', // Ignore vars with _ prefix | ||
args: 'after-used', | ||
argsIgnorePattern: '^_', // Ignore args with _ prefix | ||
}, | ||
], | ||
|
||
// Configuring import sorting | ||
'simple-import-sort/exports': 'warn', | ||
'simple-import-sort/imports': [ | ||
'warn', | ||
{ | ||
groups: [ | ||
['^@?\\w', '^\\u0000'], | ||
['^.+\\.s?css$'], | ||
['^@/lib', '^@/hooks'], | ||
['^@/data'], | ||
['^@/components', '^@/container'], | ||
['^@/store'], | ||
['^@/'], | ||
[ | ||
'^\\./?$', | ||
'^\\.(?!/?$)', | ||
'^\\.\\./?$', | ||
'^\\.\\.(?!/?$)', | ||
'^\\.\\./\\.\\./?$', | ||
'^\\.\\./\\.\\.(?!/?$)', | ||
'^\\.\\./\\.\\./\\.\\./?$', | ||
'^\\.\\./\\.\\./\\.\\.(?!/?$)', | ||
], | ||
['^@/types'], | ||
['^'], | ||
], | ||
}, | ||
], | ||
}, | ||
globals: { | ||
React: 'writable', // Updated to 'writable' to reflect correct usage | ||
JSX: true, | ||
}, | ||
}; |
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 |
---|---|---|
|
@@ -11,11 +11,13 @@ jobs: | |
name: test/node ${{ matrix.node }}/${{ matrix.platform }} | ||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
cache: 'npm' | ||
- run: npm install | ||
- run: npm run lint | ||
- run: npm run test | ||
- run: npm run build | ||
|
||
|
@@ -24,11 +26,12 @@ jobs: | |
name: coverage | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '17' | ||
- run: npm install | ||
node-version: '18' | ||
cache: 'npm' | ||
- run: npm ci | ||
- run: npm run build | ||
- uses: paambaati/[email protected] | ||
env: | ||
|
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,4 +1,8 @@ | ||
{ | ||
"semi": true, | ||
"singleQuote": true | ||
} | ||
"trailingComma": "es5", | ||
"semi": true, | ||
"tabWidth": 2, | ||
"singleQuote": true, | ||
"jsxSingleQuote": true, | ||
"plugins": ["prettier-plugin-tailwindcss"] | ||
} |
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,3 @@ | ||
// jest.setup.js | ||
|
||
import '@testing-library/jest-dom/extend-expect' | ||
import '@testing-library/jest-dom/extend-expect'; |
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,12 @@ | ||
/** @type {import('next').NextConfig} */ | ||
|
||
|
||
const nextConfig = { | ||
reactStrictMode: false, | ||
swcMinify: true, | ||
trailingSlash: true, | ||
images: { | ||
unoptimized: true | ||
unoptimized: true, | ||
}, | ||
} | ||
|
||
module.exports = nextConfig | ||
|
||
|
||
}; | ||
|
||
module.exports = nextConfig; |
Oops, something went wrong.