Skip to content

Commit 93d6068

Browse files
committed
Prettier
1 parent 550f27a commit 93d6068

14 files changed

+461
-415
lines changed

.prettierrc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"bracketSameLine": true,
3+
"trailingComma": "none",
4+
"arrowParens": "always",
5+
"bracketSpacing": true,
6+
"proseWrap": "always",
7+
"singleQuote": true,
8+
"printWidth": 120,
9+
"endOfLine": "lf",
10+
"useTabs": false,
11+
"tabWidth": 2,
12+
"semi": true
13+
}

eslint.config.js renamed to eslint.config.mjs

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,24 @@
1-
import prettier from 'eslint-config-prettier';
2-
import ts from 'typescript-eslint';
31
import globals from 'globals';
2+
import js from '@eslint/js';
43

54
export default [
6-
...ts.configs.recommended,
7-
prettier,
5+
js.configs.recommended,
86
{
9-
ignores: ['**/node_modules/', '**/build/', '**/pnpm-lock.yaml'],
7+
ignores: ['docs/**', 'tests/**', 'node_modules/*'],
108
languageOptions: {
11-
ecmaVersion: 2022,
12-
sourceType: 'module',
9+
ecmaVersion: 2021,
10+
sourceType: 'commonjs',
1311
globals: {
14-
...globals.es2022,
15-
...globals.node,
16-
guild: 'writable'
12+
...globals.commonjs,
13+
...globals.es2021,
14+
...globals.node
1715
}
1816
},
1917
rules: {
2018
'max-len': ['error', { code: 120, ignoreUrls: true, ignoreComments: true }],
21-
'@typescript-eslint/no-unused-vars': ['error', { args: 'none' }],
2219
'no-constant-condition': ['error', { checkLoops: false }],
2320
'prefer-const': ['warn', { destructuring: 'all' }],
21+
'no-unused-vars': ['error', { args: 'none' }],
2422
curly: ['warn', 'multi-line', 'consistent'],
2523
'logical-assignment-operators': 'warn',
2624
'no-template-curly-in-string': 'error',
@@ -45,7 +43,6 @@ export default [
4543
'default-case-last': 'warn',
4644
'no-self-compare': 'error',
4745
'no-new-wrappers': 'error',
48-
'no-fallthrough': 'error',
4946
'no-lone-blocks': 'error',
5047
'no-undef-init': 'error',
5148
'no-else-return': 'warn',
@@ -65,4 +62,4 @@ export default [
6562
semi: 'error'
6663
}
6764
}
68-
];
65+
];

package-lock.json

Lines changed: 18 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
"license": "MIT",
99
"scripts": {
1010
"lint": "npx eslint src/",
11-
"lint:fix": "npx eslint src/ --fix"
11+
"lint:fix": "npx eslint src/ --fix",
12+
"prettier": "npx prettier --write src/",
13+
"prettier:check": "npx prettier --check src/"
1214
},
1315
"dependencies": {
1416
"common-tags": "^1.8.0",
@@ -19,6 +21,7 @@
1921
"devDependencies": {
2022
"@eslint/js": "^9.8.0",
2123
"eslint": "^9.8.0",
22-
"globals": "^15.9.0"
24+
"globals": "^15.9.0",
25+
"prettier": "^3.3.3"
2326
}
2427
}

0 commit comments

Comments
 (0)