chore: eslint first re-config

This commit is contained in:
Rafael 2024-12-02 09:21:34 +00:00
parent 167f9f45a8
commit 61790bc41b
8 changed files with 8285 additions and 9080 deletions

View file

@ -1,29 +0,0 @@
module.exports = {
extends: ['react-app', 'prettier-standard', 'prettier/react'],
plugins: ['import'],
settings: {
'import/resolver': {
alias: [['src', './src']]
}
},
rules: {
'import/no-anonymous-default-export': [2, { allowObject: true }],
'import/order': [
'error',
{
groups: [
'builtin',
'external',
'internal',
'parent',
'sibling',
'index'
],
alphabetize: {
order: 'asc'
},
'newlines-between': 'always'
}
]
}
}

View file

@ -0,0 +1,25 @@
import globals from 'globals'
import pluginJs from '@eslint/js'
import pluginReact from 'eslint-plugin-react'
/** @type {import('eslint').Linter.Config[]} */
export default [
{ files: ['**/*.{js,mjs,cjs,jsx}'] },
{
languageOptions: {
...pluginReact.configs.flat.recommended.languageOptions,
globals: {
...globals.browser,
process: 'readonly'
}
},
},
pluginJs.configs.recommended,
pluginReact.configs.flat.recommended,
{
rules: {
'react/prop-types': 'off',
'react/display-name': 'off'
}
}
]

File diff suppressed because it is too large Load diff

View file

@ -52,23 +52,14 @@
"yup": "1.4.0"
},
"devDependencies": {
"@eslint/js": "^9.16.0",
"@vitejs/plugin-react-swc": "^3.7.2",
"esbuild-plugin-react-virtualized": "^1.0.4",
"eslint": "^7.19.0",
"eslint-config-prettier": "^6.7.0",
"eslint-config-prettier-standard": "^3.0.1",
"eslint-config-standard": "^14.1.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-node": "^10.0.0",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-react": "^7.20.3",
"eslint-plugin-standard": "^4.0.1",
"eslint": "^9.16.0",
"eslint-plugin-react": "^7.37.2",
"globals": "^15.13.0",
"husky": "^3.1.0",
"lint-staged": "^9.5.0",
"prettier": "1.19.1",
"prettier-config-standard": "^1.0.1",
"react-scripts": "4.0.0",
"vite": "^6.0.1",
"vite-plugin-svgr": "^4.3.0"

View file

@ -120,12 +120,11 @@ const Main = () => {
in={true}
mountOnEnter
unmountOnExit
children={
>
<div>
<TitleSection title={parent.title}></TitleSection>
</div>
}
/>
</Slide>
)}
<Grid container className={classes.grid}>

View file

@ -47,7 +47,7 @@ export const Carousel = memo(({ photosData, slidePhoto }) => {
next={activeIndex => slidePhoto(activeIndex)}
prev={activeIndex => slidePhoto(activeIndex)}>
{photosData.map((item, i) => (
<div>
<div key={i}>
<div className={classes.imgWrapper}>
<img
className={classes.imgInner}

View file

@ -34,7 +34,7 @@ const VolumeOverTimeGraphHeader = ({
stroke={java}
strokeWidth="3"
d="M 3 6 l 12 0"
stroke-linecap="round"
strokeLinecap="round"
/>
</svg>
),
@ -44,7 +44,7 @@ const VolumeOverTimeGraphHeader = ({
stroke={neon}
strokeWidth="3"
d="M 3 6 l 12 0"
stroke-linecap="round"
strokeLinecap="round"
/>
</svg>
)

View file

@ -50,7 +50,7 @@ const Graph = ({
const step = R.clone(start)
// eslint-disable-next-line no-unmodified-loop-condition
while (step <= end) {
ticks.push(R.clone(step))
step.setUTCHours(step.getUTCHours() + interval)