-
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.
chore: migrate yarn and update dependencies (#62)
This also applies the same eslint config as other projects
- Loading branch information
Showing
192 changed files
with
17,540 additions
and
25,283 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
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,4 @@ | ||
**/node_modules/* | ||
**/out/* | ||
**/.next/* | ||
**/dist/* |
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,133 @@ | ||
const path = require("node:path"); | ||
|
||
const paddingLineBetweenStatements = [ | ||
"error", | ||
{ blankLine: "always", next: "return", prev: "*" }, | ||
] | ||
.concat( | ||
[ | ||
"multiline-block-like", | ||
"multiline-expression", | ||
"multiline-const", | ||
"const", | ||
"type", | ||
"interface", | ||
"if", | ||
] | ||
.map((item) => [ | ||
{ blankLine: "always", next: "*", prev: item }, | ||
{ blankLine: "always", next: item, prev: "*" }, | ||
]) | ||
.flat(), | ||
) | ||
.concat([ | ||
{ | ||
blankLine: "any", | ||
next: ["singleline-const"], | ||
prev: ["singleline-const"], | ||
}, | ||
]); | ||
|
||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true, | ||
}, | ||
extends: [ | ||
"next/core-web-vitals", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:react-hooks/recommended", | ||
"plugin:jsx-a11y/recommended", | ||
], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
project: path.join(__dirname, "tsconfig.json"), | ||
}, | ||
plugins: [ | ||
"@typescript-eslint", | ||
"react-hooks", | ||
"@stylistic", | ||
"perfectionist", | ||
"import", | ||
], | ||
rules: { | ||
"@next/next/no-img-element": "off", | ||
|
||
"@stylistic/padding-line-between-statements": paddingLineBetweenStatements, | ||
|
||
"@typescript-eslint/consistent-type-imports": "error", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-shadow": "error", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ ignoreRestSiblings: true }, | ||
], | ||
"@typescript-eslint/no-use-before-define": "error", | ||
"@typescript-eslint/no-var-requires": "off", | ||
|
||
"arrow-body-style": "error", | ||
"camelcase": "off", | ||
"global-require": "off", | ||
|
||
"import/no-duplicates": "error", | ||
|
||
"jsx-a11y/anchor-has-content": "off", | ||
"jsx-a11y/anchor-is-valid": "off", | ||
"jsx-a11y/click-events-have-key-events": "off", | ||
"jsx-a11y/no-static-element-interactions": "off", | ||
|
||
"no-console": ["error", { allow: ["warn", "error"] }], | ||
"no-else-return": "error", | ||
"no-shadow": "off", | ||
"no-unused-vars": "off", | ||
"no-useless-return": "error", | ||
"object-shorthand": "error", | ||
|
||
"perfectionist/sort-classes": "error", | ||
"perfectionist/sort-enums": "error", | ||
"perfectionist/sort-exports": "error", | ||
"perfectionist/sort-interfaces": "error", | ||
"perfectionist/sort-object-types": "error", | ||
"perfectionist/sort-objects": "error", | ||
"perfectionist/sort-union-types": "error", | ||
|
||
"prefer-const": "error", | ||
"prefer-destructuring": ["error"], | ||
"prefer-spread": "error", | ||
"prefer-template": "error", | ||
"quote-props": ["error", "consistent-as-needed"], | ||
|
||
"react-hooks/exhaustive-deps": "error", | ||
"react-hooks/rules-of-hooks": "error", | ||
|
||
"react/destructuring-assignment": [ | ||
"error", | ||
"always", | ||
{ destructureInSignature: "always" }, | ||
], | ||
"react/display-name": "off", | ||
"react/function-component-definition": "off", | ||
"react/jsx-boolean-value": "error", | ||
"react/jsx-curly-brace-presence": "error", | ||
"react/jsx-filename-extension": "off", | ||
"react/jsx-fragments": "error", | ||
"react/jsx-key": ["error", { warnOnDuplicates: true }], | ||
"react/jsx-no-useless-fragment": "error", | ||
"react/jsx-one-expression-per-line": "off", | ||
"react/jsx-props-no-spreading": "off", | ||
"react/jsx-sort-props": "error", | ||
"react/no-array-index-key": "off", | ||
"react/no-unescaped-entities": "off", | ||
"react/no-unknown-property": "off", | ||
"react/no-unstable-nested-components": "error", | ||
"react/no-unused-prop-types": "error", | ||
"react/react-in-jsx-scope": "off", | ||
"react/require-default-props": "off", | ||
"react/self-closing-comp": "error", | ||
}, | ||
settings: { | ||
react: { | ||
version: "detect", | ||
}, | ||
}, | ||
}; |
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 |
---|---|---|
|
@@ -35,3 +35,10 @@ yarn-error.log* | |
|
||
|
||
test.js | ||
|
||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions |
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,7 @@ | ||
{ | ||
"importOrder": ["^~(.*)$", "@/(src|utils|models|api)", "^[./]"], | ||
"importOrderSeparation": true, | ||
"importOrderSortSpecifiers": true, | ||
"plugins": ["@trivago/prettier-plugin-sort-imports"], | ||
"quoteProps": "consistent" | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
nodeLinker: node-modules | ||
|
||
plugins: | ||
- checksum: 0141f8cfb8a5ea41428cc0a49cf412f0cf13a3f3f9e51ef354768b5c988c93d0adc46c318d11b6da858b9ce9a9c8db0069712c10be35f9ac440071bc00bc4216 | ||
path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs | ||
spec: "https://mskelton.dev/yarn-outdated/v3" | ||
|
||
yarnPath: .yarn/releases/yarn-4.0.2.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// __mocks__/fileMock.js | ||
module.exports = { | ||
src: '/img.jpg', | ||
blurDataURL: 'data:image/png;base64,imagedata', | ||
height: 24, | ||
src: '/img.jpg', | ||
width: 24, | ||
blurDataURL: 'data:image/png;base64,imagedata', | ||
} |
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,2 +1 @@ | ||
export { default as MockTheme } from './theme'; | ||
export { wait } from './wait'; | ||
export { default as MockTheme } from "./theme"; |
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 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 |
---|---|---|
@@ -1,19 +1,15 @@ | ||
/* eslint-disable */ | ||
const workaround = require('next-translate/lib/cjs/plugin/utils.js'); | ||
|
||
workaround.defaultLoader = | ||
'(l, n) => import(`@/public/locales/${l}/${n}.json`).then(m => m.default)'; | ||
|
||
module.exports = { | ||
locales: ['en'], | ||
defaultLocale: 'en', | ||
defaultLocale: "en", | ||
loadLocaleFrom: (lang, ns) => | ||
import(`./public/locales/${lang}/${ns}.json`).then((m) => m.default), | ||
locales: ["en"], | ||
pages: { | ||
'*': ['common'], | ||
'rgx:^/donation': ['donation'], | ||
'rgx:^/about': ['about'], | ||
'rgx:^/faq': ['faq'], | ||
'rgx:^/terms-and-conditions': ['terms-and-conditions'], | ||
'rgx:^/privacy-policy': ['privacy-policy'], | ||
'rgx:^/all-networks': ['all-networks'], | ||
"*": ["common"], | ||
"rgx:^/about": ["about"], | ||
"rgx:^/all-networks": ["all-networks"], | ||
"rgx:^/donation": ["donation"], | ||
"rgx:^/faq": ["faq"], | ||
"rgx:^/privacy-policy": ["privacy-policy"], | ||
"rgx:^/terms-and-conditions": ["terms-and-conditions"], | ||
}, | ||
}; |
Oops, something went wrong.