-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: upgrade (eslint 9, react 19, vite 6, date-fns 4, extract-colors…
… 4, etc.) + fixes (#174) - upgrade `eslint` to v9 & `prettier` to v3 - upgrade `vite` to v6 - upgrade `tailwindcss` & `postcss` - upgrade various deps (minor) - upgrade `date-fns` to v4 - upgrade `extract-colors` to v4 - upgrade `radash` to v12 - upgrade to `react` v19 - upgrade `@e-krebs/react-library` to v0.0.41 fixes: - more agressive caching - smiley uses currentColor (was black on dark background in dark mode) - fix: matching url was broken - defensiveness in pocket/get
- Loading branch information
Showing
54 changed files
with
568 additions
and
383 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,5 +1,6 @@ | ||
{ | ||
"plugins": ["prettier-plugin-tailwindcss"], | ||
"printWidth": 105, | ||
"singleQuote": true, | ||
"endOfLine": "auto" | ||
} | ||
} |
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,116 @@ | ||
import { fixupConfigRules, fixupPluginRules } from '@eslint/compat'; | ||
import reactRefresh from 'eslint-plugin-react-refresh'; | ||
import typescriptEslint from '@typescript-eslint/eslint-plugin'; | ||
import reactHooks from 'eslint-plugin-react-hooks'; | ||
import _import from 'eslint-plugin-import'; | ||
import prettier from 'eslint-plugin-prettier'; | ||
import tsParser from '@typescript-eslint/parser'; | ||
import path from 'node:path'; | ||
import { fileURLToPath } from 'node:url'; | ||
import js from '@eslint/js'; | ||
import { FlatCompat } from '@eslint/eslintrc'; | ||
|
||
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 [ | ||
{ | ||
files: ['**/*.ts', '**/*.tsx'], | ||
}, | ||
{ | ||
ignores: ['**/*tailwind.config.ts'], | ||
}, | ||
...fixupConfigRules( | ||
compat.extends( | ||
'eslint:recommended', | ||
'plugin:react/recommended', | ||
'plugin:react-hooks/recommended', | ||
'plugin:@typescript-eslint/eslint-recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:import/typescript' | ||
) | ||
), | ||
{ | ||
plugins: { | ||
'react-refresh': reactRefresh, | ||
'@typescript-eslint': fixupPluginRules(typescriptEslint), | ||
'react-hooks': fixupPluginRules(reactHooks), | ||
import: fixupPluginRules(_import), | ||
prettier, | ||
}, | ||
|
||
languageOptions: { | ||
parser: tsParser, | ||
}, | ||
|
||
settings: { | ||
'import/resolver': { | ||
node: { | ||
extensions: ['.js', '.jsx', '.ts', '.tsx'], | ||
}, | ||
|
||
typescript: {}, | ||
}, | ||
|
||
react: { | ||
version: 'detect', | ||
}, | ||
}, | ||
|
||
rules: { | ||
'prettier/prettier': 'error', | ||
'no-prototype-builtins': 'off', | ||
|
||
'no-console': [ | ||
'error', | ||
{ | ||
allow: ['warn', 'error'], | ||
}, | ||
], | ||
|
||
'require-await': 'error', | ||
'react/jsx-uses-react': 'off', | ||
'react/react-in-jsx-scope': 'off', | ||
'@typescript-eslint/no-empty-function': 'off', | ||
'react/no-unescaped-entities': 'off', | ||
'react-hooks/rules-of-hooks': 'error', | ||
'react-hooks/exhaustive-deps': 'error', | ||
|
||
'react-refresh/only-export-components': [ | ||
'warn', | ||
{ | ||
allowConstantExport: true, | ||
}, | ||
], | ||
|
||
'import/order': [ | ||
'error', | ||
{ | ||
groups: [['builtin', 'external'], ['internal'], ['parent', 'sibling', 'index']], | ||
'newlines-between': 'always', | ||
}, | ||
], | ||
|
||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ | ||
ignoreRestSiblings: true, | ||
}, | ||
], | ||
|
||
semi: ['error', 'always'], | ||
}, | ||
}, | ||
{ | ||
files: ['**/*.d.ts'], | ||
|
||
rules: { | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
}, | ||
}, | ||
]; |
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.