Skip to content

Commit b47f8a7

Browse files
committed
chore: update template
1 parent b043496 commit b47f8a7

File tree

11 files changed

+1235
-1727
lines changed

11 files changed

+1235
-1727
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ jobs:
1919
run: npm ci
2020

2121
- name: Lint 🧹
22-
run: npm run lint
22+
run: |
23+
npm run lint
24+
npm run ts-check
2325
2426
- name: Build 🔧
2527
run: npm run build

.github/workflows/pr.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ jobs:
1919
run: npm ci
2020

2121
- name: Lint 🧹
22-
run: npm run lint
22+
run: |
23+
npm run lint
24+
npm run ts-check
2325
2426
- name: Build 🔧
2527
run: npm run build

.prettierrc.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"trailingComma": "es5",
3-
"tabWidth": 2,
2+
"arrowParens": "avoid",
3+
"endOfLine": "auto",
44
"semi": true,
55
"singleQuote": false,
6-
"endOfLine": "auto",
7-
"arrowParens": "avoid"
6+
"tabWidth": 2,
7+
"trailingComma": "es5"
88
}

eslint.config.mjs

Lines changed: 5 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,7 @@
1-
import jsEslint from "@eslint/js";
2-
import eslintConfigPrettier from "eslint-config-prettier";
3-
import importPlugin from "eslint-plugin-import";
4-
import tsEslint from "typescript-eslint";
1+
import wopjs, { defineConfig } from "@wopjs/eslint-config";
52

6-
export default tsEslint.config(
7-
jsEslint.configs.recommended,
8-
...tsEslint.configs.recommended,
9-
importPlugin.flatConfigs.recommended,
10-
importPlugin.flatConfigs.typescript,
11-
eslintConfigPrettier,
12-
{
13-
ignores: ["**/dist/", "**/public/", "**/docs/", "**/node_modules/"],
3+
export default defineConfig(...wopjs, {
4+
rules: {
5+
"@typescript-eslint/no-explicit-any": "off",
146
},
15-
{
16-
languageOptions: {
17-
ecmaVersion: "latest",
18-
sourceType: "module",
19-
globals: {
20-
console: true,
21-
process: true,
22-
},
23-
},
24-
rules: {
25-
"import/no-unresolved": "off",
26-
"import/newline-after-import": [
27-
"error",
28-
{ considerComments: true, count: 1 },
29-
],
30-
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
31-
"import/no-duplicates": ["error", { considerQueryString: true }],
32-
"import/order": [
33-
"error",
34-
{
35-
"newlines-between": "always",
36-
alphabetize: { order: "asc", caseInsensitive: true },
37-
groups: [
38-
"object",
39-
"type",
40-
["builtin", "external", "internal"],
41-
["parent", "sibling", "index"],
42-
],
43-
pathGroups: [
44-
{
45-
pattern: "*.+(scss|css|less)",
46-
patternOptions: { matchBase: true },
47-
group: "object",
48-
},
49-
{ pattern: "~/**", group: "internal", position: "after" },
50-
{ pattern: "../**", group: "parent", position: "before" },
51-
],
52-
pathGroupsExcludedImportTypes: [
53-
"builtin",
54-
"external",
55-
"object",
56-
"type",
57-
],
58-
distinctGroup: false,
59-
},
60-
],
61-
},
62-
},
63-
{
64-
files: ["**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"],
65-
plugins: {
66-
"@typescript-eslint": tsEslint.plugin,
67-
},
68-
languageOptions: {
69-
parser: tsEslint.parser,
70-
},
71-
rules: {
72-
"@typescript-eslint/no-explicit-any": "off",
73-
"@typescript-eslint/consistent-type-imports": "error",
74-
"@typescript-eslint/no-empty-interface": "off",
75-
"@typescript-eslint/no-non-null-assertion": "off",
76-
"@typescript-eslint/no-unused-vars": [
77-
"error",
78-
{
79-
argsIgnorePattern: "^_",
80-
varsIgnorePattern: "^_",
81-
destructuredArrayIgnorePattern: "^_",
82-
ignoreRestSiblings: true,
83-
},
84-
],
85-
},
86-
}
87-
);
7+
});

0 commit comments

Comments
 (0)