-
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.
* chore: eslint plugins and emotion dependencies updated * chore: updated @mui/material dependency BREAKING CHANGE: styled(Box) is now deprecated, use styled('div') instead or cast 'as typeof Box'. * chore: updated @mui/material-nextjs dependency * chore: updated @mui/material-icons * chore: updated eslint, typescript and typescript eslint plugins * chore: updated prettier, husky, jdon, testing library and react router dom * chore: updated react react dom, types and react node dependencies * chore: updated next, cypress, styled components and ts-jest * chore: updated rainbowkit, wagmi, viem, react-query and crypto-husky-checks * chore: modified husky pre-commit script * chore: eslint config migrated to v9 * chore: updated lock file * chore: modified scripts, linting and format * chore: fixed eslint file and imports * chore: added rule to avoide deleting closing curly braces * chore: added new rule * chore: improved import order * chore: added new order rules * chore: run lint:fix command
- Loading branch information
1 parent
67c6829
commit dda206a
Showing
21 changed files
with
3,109 additions
and
3,150 deletions.
There are no files selected for viewing
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,7 +1,3 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
|
||
npx lint-staged | ||
|
||
. "$(dirname "$0")/wonderland/find-crypto-keys.sh" |
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,105 @@ | ||
import path from 'node:path'; | ||
import { fileURLToPath } from 'node:url'; | ||
|
||
import { fixupConfigRules, fixupPluginRules } from '@eslint/compat'; | ||
import { FlatCompat } from '@eslint/eslintrc'; | ||
import js from '@eslint/js'; | ||
import tsParser from '@typescript-eslint/parser'; | ||
import prettierConfig from 'eslint-config-prettier'; | ||
import importPlugin from 'eslint-plugin-import'; | ||
import prettierPlugin from 'eslint-plugin-prettier'; | ||
import reactRefresh from 'eslint-plugin-react-refresh'; | ||
import globals from 'globals'; | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
recommendedConfig: js.configs.recommended, | ||
allConfig: js.configs.all, | ||
}); | ||
|
||
export default [ | ||
{ | ||
ignores: ['**/dist', '**/eslint.config.mjs'], | ||
}, | ||
...fixupConfigRules( | ||
compat.extends( | ||
'prettier', | ||
'plugin:react/recommended', | ||
'plugin:jsx-a11y/recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:import/typescript', | ||
'plugin:react/jsx-runtime', | ||
'plugin:react-hooks/recommended', | ||
'plugin:@next/next/recommended', | ||
), | ||
), | ||
{ | ||
files: ['**/*.{js,mjs,cjs,jsx,ts,tsx}'], | ||
plugins: { | ||
'react-refresh': reactRefresh, | ||
import: fixupPluginRules(importPlugin), | ||
prettier: fixupPluginRules(prettierPlugin), | ||
}, | ||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
}, | ||
parser: tsParser, | ||
}, | ||
rules: { | ||
'import/order': [ | ||
'error', | ||
{ | ||
'newlines-between': 'never', | ||
alphabetize: { | ||
order: 'asc', | ||
caseInsensitive: false, | ||
}, | ||
// Enforce a specific import order | ||
groups: ['external', 'builtin', 'parent', 'sibling', 'index', 'object', 'type', 'unknown'], | ||
pathGroups: [ | ||
{ | ||
pattern: 'react', | ||
group: 'external', | ||
position: 'before', | ||
}, | ||
{ | ||
pattern: 'next', | ||
group: 'external', | ||
position: 'before', | ||
}, | ||
{ | ||
pattern: 'next/**', | ||
group: 'external', | ||
position: 'before', | ||
}, | ||
{ | ||
pattern: '~/assets/**', | ||
group: 'unknown', | ||
position: 'after', | ||
}, | ||
{ | ||
pattern: '~/**', | ||
group: 'parent', | ||
position: 'before', | ||
}, | ||
], | ||
pathGroupsExcludedImportTypes: ['react'], | ||
}, | ||
], | ||
// Prettier plugin to apply formatting rules | ||
'prettier/prettier': 'error', // This tells ESLint to show Prettier errors as ESLint errors | ||
'@typescript-eslint/no-empty-object-type': 'off', | ||
'@typescript-eslint/no-empty-interface': 'off', | ||
}, | ||
settings: { | ||
// Spread Prettier config to disable conflicting ESLint rules | ||
...prettierConfig, | ||
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
Oops, something went wrong.