Skip to content

Commit 2ac8dc8

Browse files
authored
Migrate from tslint (deprecated) to eslint (vkolgi#70)
* chore(migrate): migrate from TSLint to ESLint + Prettier
1 parent bea7078 commit 2ac8dc8

File tree

7 files changed

+2372
-679
lines changed

7 files changed

+2372
-679
lines changed

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"singleQuote": true,
3+
"semi": true,
4+
"trailingComma": "es5",
5+
"printWidth": 80,
6+
"tabWidth": 4
7+
}

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# json-to-graphql-query Changelog
22

3+
## 2.3.0
4+
5+
- chore(migrate): Migrated from tslint(deprecated) to eslint configuration
6+
- ci: Added lint:fix command to fix eslint errors
7+
- chore: Added complimenting prettier configuration
8+
39
## 2.2.6
410

511
- fix: Handle deep nested falsy values in result #68

eslint.config.mjs

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import tsEslint from '@typescript-eslint/eslint-plugin';
2+
import parser from '@typescript-eslint/parser';
3+
4+
export default [
5+
{
6+
files: ['src/**/*.{ts,tsx,js,jsx}'],
7+
languageOptions: {
8+
parser: parser,
9+
parserOptions: {
10+
ecmaVersion: 2020,
11+
sourceType: 'module',
12+
project: './tsconfig.json',
13+
tsconfigRootDir: '.',
14+
extraFileExtensions: ['.ts', '.tsx'],
15+
},
16+
},
17+
plugins: {
18+
'@typescript-eslint': tsEslint,
19+
},
20+
rules: {
21+
'comma-dangle': 'off',
22+
'sort-keys': 'off',
23+
'quote-props': ['error', 'as-needed'],
24+
'import/order': 'off',
25+
'no-console': 'off',
26+
'@typescript-eslint/no-unused-vars': 'off',
27+
eqeqeq: 'off',
28+
'brace-style': 'off',
29+
curly: 'off',
30+
'semi-style': 'off',
31+
'prefer-arrow/prefer-arrow-functions': 'off',
32+
quotes: ['error', 'single', { avoidEscape: true }],
33+
'for-in': 'off',
34+
'@typescript-eslint/naming-convention': 'off',
35+
'no-empty': 'off',
36+
'import/no-extraneous-dependencies': 'off',
37+
'@typescript-eslint/no-string-literal': 'off',
38+
'no-restricted-imports': 'off',
39+
'object-shorthand': 'off',
40+
'@typescript-eslint/explicit-member-accessibility': 'off',
41+
'prefer-ternary': 'off',
42+
'prefer-for-of': 'off',
43+
'@typescript-eslint/member-ordering': 'off',
44+
'prefer-object-spread': 'off',
45+
'eol-last': 'off',
46+
'@typescript-eslint/array-type': 'off',
47+
},
48+
},
49+
];

0 commit comments

Comments
 (0)