Skip to content

Commit a7f3d34

Browse files
Merge pull request #362 from ijlee2/update-dependencies
Updated dependencies
2 parents 59be4c4 + 73e3df4 commit a7f3d34

File tree

16 files changed

+3237
-3138
lines changed

16 files changed

+3237
-3138
lines changed

.eslintignore

Lines changed: 0 additions & 32 deletions
This file was deleted.

.eslintrc.cjs

Lines changed: 0 additions & 106 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ jobs:
1717
steps:
1818
- uses: actions/checkout@v4
1919

20-
- uses: pnpm/action-setup@v2
20+
- uses: pnpm/action-setup@v4
2121
with:
22-
version: 8
2322
run_install: false
2423

2524
- uses: actions/setup-node@v4

.npmignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,20 @@
33
/examples/
44
/src/
55
/tests/
6-
/.eslintignore
7-
/.eslintrc.cjs
86
/.gitignore
97
/.prettierignore
10-
/.prettierrc.cjs
118
/.release-it.json
129
/.release-plan.json
1310
/CODE_OF_CONDUCT.md
1411
/CONTRIBUTING.md
1512
/RELEASE.md
1613
/ast-notes.md
1714
/design.md
15+
/eslint.config.mjs
1816
/index.html
1917
/pnpm-lock.yaml
2018
/pnpm-workspace.yaml
19+
/prettier.config.mjs
2120
/tsconfig.json
2221
/tsconfig.lint.json
2322
/vite.config.ts

.prettierignore

Lines changed: 13 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,15 @@
1-
# Specific to prettierignore
1+
# compiled output
2+
/dist/
3+
4+
# misc
5+
!.*
6+
.*/
27
pnpm-lock.yaml
3-
**/*/pnpm-lock.yaml
4-
tests/__snapshots__
5-
tests/cases
6-
CHANGELOG.md
7-
examples
8-
9-
# Everything below this point should match gitignore
10-
11-
# Logs
12-
logs
13-
*.log
14-
npm-debug.log*
15-
yarn-debug.log*
16-
yarn-error.log*
17-
pnpm-debug.log*
18-
lerna-debug.log*
198

20-
node_modules
21-
dist
22-
dist-ssr
23-
*.local
24-
.eslintcache
25-
.npmrc
26-
27-
# Editor directories and files
28-
.idea
29-
.DS_Store
30-
*.suo
31-
*.ntvs*
32-
*.njsproj
33-
*.sln
34-
*.sw?
35-
*.yml
36-
*.yaml
37-
*.md
9+
# specific to this package
10+
/examples/
11+
/tests/__snapshots__/
12+
/tests/cases/
13+
CHANGELOG.md
14+
README.md
15+
RELEASE.md

eslint.config.mjs

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
import babelEslintParser from '@babel/eslint-parser';
2+
import eslint from '@eslint/js';
3+
import eslintPluginVitest from '@vitest/eslint-plugin';
4+
import eslintConfigPrettier from 'eslint-config-prettier';
5+
import eslintPluginJsdoc from 'eslint-plugin-jsdoc';
6+
import eslintPluginN from 'eslint-plugin-n';
7+
import eslintPluginSimpleImportSort from 'eslint-plugin-simple-import-sort';
8+
import eslintPluginUnicorn from 'eslint-plugin-unicorn';
9+
import globals from 'globals';
10+
import tseslint from 'typescript-eslint';
11+
12+
const parserOptionsJs = {
13+
ecmaFeatures: {
14+
modules: true,
15+
},
16+
ecmaVersion: 'latest',
17+
requireConfigFile: false,
18+
};
19+
20+
const parserOptionsTs = {
21+
projectService: true,
22+
// eslint-disable-next-line n/no-unsupported-features/node-builtins
23+
tsconfigRootDir: import.meta.dirname,
24+
};
25+
26+
const customRules = {
27+
rules: {
28+
'jsdoc/check-param-names': 'off',
29+
'jsdoc/newline-after-description': 'off',
30+
'jsdoc/require-jsdoc': ['error', { publicOnly: true }],
31+
'jsdoc/require-param': 'off',
32+
'jsdoc/require-param-type': 'off',
33+
'jsdoc/require-returns': 'off',
34+
'jsdoc/require-returns-type': 'off',
35+
'jsdoc/tag-lines': 'off',
36+
'unicorn/consistent-destructuring': 'off',
37+
'unicorn/consistent-function-scoping': [
38+
'error',
39+
{ checkArrowFunctions: false },
40+
],
41+
'unicorn/custom-error-definition': 'error',
42+
'unicorn/no-array-callback-reference': 'off',
43+
'unicorn/no-empty-file': 'off',
44+
'unicorn/no-null': 'off',
45+
'unicorn/prefer-module': 'off',
46+
'unicorn/prefer-ternary': ['error', 'only-single-line'],
47+
'unicorn/prevent-abbreviations': [
48+
'error',
49+
{ allowList: { args: true, doc: true, Doc: true, env: true } },
50+
],
51+
},
52+
};
53+
54+
export default tseslint.config(
55+
{
56+
ignores: [
57+
'dist/',
58+
'node_modules/',
59+
'.*/',
60+
'tests/__snapshots__/',
61+
'tests/cases/',
62+
'vite.config.ts',
63+
],
64+
},
65+
{
66+
linterOptions: {
67+
reportUnusedDisableDirectives: 'error',
68+
},
69+
},
70+
71+
eslint.configs.recommended,
72+
tseslint.configs.strict,
73+
eslintPluginJsdoc.configs['flat/recommended'],
74+
eslintPluginUnicorn.configs.recommended,
75+
eslintConfigPrettier,
76+
{
77+
plugins: {
78+
'simple-import-sort': eslintPluginSimpleImportSort,
79+
},
80+
rules: {
81+
'simple-import-sort/imports': 'error',
82+
'simple-import-sort/exports': 'error',
83+
},
84+
},
85+
customRules,
86+
87+
// JavaScript files
88+
{
89+
files: ['**/*.js'],
90+
languageOptions: {
91+
parser: babelEslintParser,
92+
parserOptions: parserOptionsJs,
93+
},
94+
},
95+
96+
// TypeScript files
97+
{
98+
extends: [tseslint.configs.recommendedTypeChecked],
99+
files: ['**/*.ts'],
100+
languageOptions: {
101+
parserOptions: parserOptionsTs,
102+
},
103+
},
104+
105+
// Test Files
106+
{
107+
...eslintPluginVitest.configs.recommended,
108+
files: ['tests/**/*.test.{js,ts}'],
109+
plugins: {
110+
vitest: eslintPluginVitest,
111+
},
112+
},
113+
114+
// Configuration files
115+
{
116+
...eslintPluginN.configs['flat/recommended-script'],
117+
files: ['**/*.cjs'],
118+
languageOptions: {
119+
ecmaVersion: 'latest',
120+
globals: globals.node,
121+
sourceType: 'script',
122+
},
123+
plugins: {
124+
n: eslintPluginN,
125+
},
126+
},
127+
{
128+
...eslintPluginN.configs['flat/recommended-module'],
129+
files: ['**/*.mjs'],
130+
languageOptions: {
131+
ecmaVersion: 'latest',
132+
globals: globals.node,
133+
parserOptions: parserOptionsJs,
134+
sourceType: 'module',
135+
},
136+
plugins: {
137+
n: eslintPluginN,
138+
},
139+
},
140+
);

0 commit comments

Comments
 (0)