Skip to content

Commit

Permalink
📦 upgrade packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Primajin committed Dec 11, 2024
1 parent 2aa7472 commit d6fe7c6
Show file tree
Hide file tree
Showing 7 changed files with 385 additions and 494 deletions.
20 changes: 0 additions & 20 deletions .eslintrc.cjs

This file was deleted.

5 changes: 3 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '21'
node-version: '22'
cache: 'npm'
- name: Cache dependencies
uses: actions/cache@v4
Expand All @@ -43,6 +43,7 @@ jobs:
uses: wearerequired/lint-action@v2
with:
auto_fix: true
eslint: true
# eslint: true # does not support eslint 9 yet
eslint_args: "--report-unused-disable-directives --max-warnings 0"
commit_message: ":sparkles: Fix code style issues with ${linter}"
git_email: [email protected]
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '21'
node-version: '22'
cache: 'npm'
- name: Cache dependencies
uses: actions/cache@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '21'
node-version: '22'
cache: 'npm'
- name: Cache dependencies
uses: actions/cache@v4
Expand Down
51 changes: 51 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import {fixupConfigRules} from '@eslint/compat';
import reactRefresh from 'eslint-plugin-react-refresh';
import globals from 'globals';
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 [
{
ignores: ['**/dist'],
}, ...fixupConfigRules(compat.extends(
'eslint:recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
)).map(config => ({
...config,
files: ['**/*.js', '**/*.jsx'],
})), {
files: ['**/*.js', '**/*.jsx'],
plugins: {
'react-refresh': reactRefresh,
},
languageOptions: {
globals: {
...globals.browser,
},
ecmaVersion: 'latest',
sourceType: 'module',
},
settings: {
react: {
version: '19.0',
},
},
rules: {
'react-refresh/only-export-components': [
'warn', {
allowConstantExport: true,
}],
},
}];
Loading

0 comments on commit d6fe7c6

Please sign in to comment.