-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* lint(*): update code according to latest eslint setup and config * lint(ui): update code according to latest next/react eslint setup and config * lint(*): fix all linting issue * lint(knip): fix all knipping issue * fix(script): revert changes did to generate-schema * fix(web/script): asset generation
- Loading branch information
1 parent
c20e5b8
commit fee921a
Showing
53 changed files
with
2,459 additions
and
2,535 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import process from 'process'; | ||
|
||
// eslint-disable-next-line import/no-extraneous-dependencies | ||
import { includeIgnoreFile } from '@eslint/compat'; | ||
// eslint-disable-next-line import/no-extraneous-dependencies | ||
import eslint from '@eslint/js'; | ||
import { node, next } from '@poolofdeath20/eslint-config'; | ||
import tseslint from 'typescript-eslint'; | ||
|
||
const allowedFor = ['InternalLink', 'Image', 'Link']; | ||
|
||
export default tseslint.config( | ||
includeIgnoreFile(`${process.cwd()}/.gitignore`), | ||
eslint.configs.recommended, | ||
...tseslint.configs.recommendedTypeChecked, | ||
...tseslint.configs.strict, | ||
...tseslint.configs.stylistic, | ||
node, | ||
{ | ||
...next, | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment | ||
rules: { | ||
...next.rules, | ||
'react/forbid-component-props': [ | ||
'error', | ||
{ | ||
forbid: [ | ||
{ | ||
propName: 'style', | ||
allowedFor, | ||
message: `Props "style" is forbidden for all components except ${allowedFor | ||
.map((component) => { | ||
return `"${component}"`; | ||
}) | ||
.join(', ')}`, | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
} | ||
); |
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,17 +1,13 @@ | ||
const config = () => { | ||
const url = process.env.NEXT_PUBLIC_ORIGIN; | ||
// eslint-disable-next-line no-undef | ||
const url = process.env.NEXT_PUBLIC_ORIGIN; | ||
|
||
/** @type {import('next-sitemap').IConfig} */ | ||
const config = { | ||
siteUrl: url, | ||
generateRobotsTxt: true, // (optional) | ||
exclude: ['/server-sitemap.xml'], | ||
robotsTxtOptions: { | ||
additionalSitemaps: [`${url}/server-sitemap.xml`], | ||
}, | ||
}; | ||
|
||
return config; | ||
/** @type {import('next-sitemap').IConfig} */ | ||
// eslint-disable-next-line no-undef, import/no-commonjs | ||
module.exports = { | ||
siteUrl: url, | ||
generateRobotsTxt: true, // (optional) | ||
exclude: ['/server-sitemap.xml'], | ||
robotsTxtOptions: { | ||
additionalSitemaps: [`${url}/server-sitemap.xml`], | ||
}, | ||
}; | ||
|
||
module.exports = config(); |
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 @@ | ||
import process from 'process'; | ||
|
||
import withPWAInit from '@ducanh2912/next-pwa'; | ||
|
||
const withPWA = withPWAInit({ | ||
|
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
Oops, something went wrong.