Skip to content

Commit cfabd2c

Browse files
committed
update and fix dependenceis
1 parent aac7ab2 commit cfabd2c

File tree

9 files changed

+5804
-3159
lines changed

9 files changed

+5804
-3159
lines changed

.eslintrc.js

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

.mocharc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ module.exports = {
33
exit: true,
44
extensions: ['ts'],
55
'node-option': [
6-
'import=ts-node/esm'
7-
]
6+
'import=ts-node/esm',
7+
],
88
}

eslint.config.mjs

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
import neostandard, { resolveIgnoresFromGitignore } from 'neostandard'
2+
import eslint from '@eslint/js'
3+
import tseslint from 'typescript-eslint'
4+
5+
export default [
6+
...neostandard({
7+
ignores: [
8+
...resolveIgnoresFromGitignore(),
9+
],
10+
ts: true,
11+
}),
12+
eslint.configs.recommended,
13+
...tseslint.configs.strictTypeChecked,
14+
...tseslint.configs.stylisticTypeChecked,
15+
{
16+
languageOptions: {
17+
parserOptions: {
18+
projectService: {
19+
allowDefaultProject: ['*.mjs', '.*.js'],
20+
},
21+
tsconfigRootDir: process.cwd(),
22+
},
23+
},
24+
},
25+
{
26+
name: 'migrate/eslint-config-standard-with-typescript',
27+
rules: {
28+
'@typescript-eslint/array-type': ['error', { default: 'array-simple' }],
29+
'@typescript-eslint/consistent-type-exports': [
30+
'error',
31+
{
32+
fixMixedExportsWithInlineTypeSpecifier: true,
33+
},
34+
],
35+
'@typescript-eslint/consistent-type-imports': 'error',
36+
'@stylistic/member-delimiter-style': [
37+
'error',
38+
{
39+
multiline: { delimiter: 'none' },
40+
singleline: { delimiter: 'comma', requireLast: false },
41+
},
42+
],
43+
'@typescript-eslint/method-signature-style': 'error',
44+
'@typescript-eslint/no-explicit-any': 'off',
45+
'@typescript-eslint/no-unnecessary-condition': 'off',
46+
'@typescript-eslint/no-unsafe-assignment': 'off',
47+
'@typescript-eslint/no-unsafe-call': 'off',
48+
'@typescript-eslint/no-unsafe-member-access': 'off',
49+
'@typescript-eslint/no-unsafe-return': 'off',
50+
'@typescript-eslint/promise-function-async': 'error',
51+
'@typescript-eslint/require-array-sort-compare': 'error',
52+
'@typescript-eslint/require-await': 'off',
53+
'@typescript-eslint/return-await': ['error', 'always'],
54+
'@typescript-eslint/triple-slash-reference': ['error', { lib: 'never', path: 'never', types: 'never' }],
55+
'@stylistic/type-annotation-spacing': 'error',
56+
'@typescript-eslint/use-unknown-in-catch-callback-variable': 'off',
57+
},
58+
},
59+
{
60+
name: 'RopeScore/custom',
61+
rules: {
62+
'@typescript-eslint/restrict-template-expressions': ['warn', {
63+
allowNumber: true,
64+
allowBoolean: true,
65+
allowRegExp: true,
66+
allowAny: true,
67+
}],
68+
'@typescript-eslint/no-this-alias': 'off',
69+
'@typescript-eslint/only-throw-error': ['error', {
70+
allowThrowingUnknown: true,
71+
}],
72+
'@stylistic/comma-dangle': ['warn', {
73+
arrays: 'always-multiline',
74+
objects: 'always-multiline',
75+
imports: 'always-multiline',
76+
exports: 'always-multiline',
77+
functions: 'never',
78+
}],
79+
'no-void': 'off',
80+
'no-console': 'warn',
81+
},
82+
},
83+
{
84+
name: 'RopeScore/tests',
85+
files: ['**/*.test.ts', '**/*.test.js'],
86+
rules: {
87+
'@typescript-eslint/ban-ts-comment': ['error', {
88+
'ts-expect-error': false,
89+
'ts-ignore': true,
90+
'ts-nocheck': true,
91+
'ts-check': false,
92+
minimumDescriptionLength: 3,
93+
}],
94+
},
95+
},
96+
{
97+
name: 'RopeScore/bin',
98+
files: ['bin/*.ts', 'bin/*.js'],
99+
rules: {
100+
'no-console': 'off',
101+
},
102+
},
103+
]

0 commit comments

Comments
 (0)