Skip to content

Commit

Permalink
Migrate from tslint (deprecated) to eslint (#70)
Browse files Browse the repository at this point in the history
* chore(migrate): migrate from TSLint to ESLint + Prettier
  • Loading branch information
vkolgi authored Sep 15, 2024
1 parent bea7078 commit 2ac8dc8
Show file tree
Hide file tree
Showing 7 changed files with 2,372 additions and 679 deletions.
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"singleQuote": true,
"semi": true,
"trailingComma": "es5",
"printWidth": 80,
"tabWidth": 4
}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# json-to-graphql-query Changelog

## 2.3.0

- chore(migrate): Migrated from tslint(deprecated) to eslint configuration
- ci: Added lint:fix command to fix eslint errors
- chore: Added complimenting prettier configuration

## 2.2.6

- fix: Handle deep nested falsy values in result #68
Expand Down
49 changes: 49 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import tsEslint from '@typescript-eslint/eslint-plugin';
import parser from '@typescript-eslint/parser';

export default [
{
files: ['src/**/*.{ts,tsx,js,jsx}'],
languageOptions: {
parser: parser,
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
project: './tsconfig.json',
tsconfigRootDir: '.',
extraFileExtensions: ['.ts', '.tsx'],
},
},
plugins: {
'@typescript-eslint': tsEslint,
},
rules: {
'comma-dangle': 'off',
'sort-keys': 'off',
'quote-props': ['error', 'as-needed'],
'import/order': 'off',
'no-console': 'off',
'@typescript-eslint/no-unused-vars': 'off',
eqeqeq: 'off',
'brace-style': 'off',
curly: 'off',
'semi-style': 'off',
'prefer-arrow/prefer-arrow-functions': 'off',
quotes: ['error', 'single', { avoidEscape: true }],
'for-in': 'off',
'@typescript-eslint/naming-convention': 'off',
'no-empty': 'off',
'import/no-extraneous-dependencies': 'off',
'@typescript-eslint/no-string-literal': 'off',
'no-restricted-imports': 'off',
'object-shorthand': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
'prefer-ternary': 'off',
'prefer-for-of': 'off',
'@typescript-eslint/member-ordering': 'off',
'prefer-object-spread': 'off',
'eol-last': 'off',
'@typescript-eslint/array-type': 'off',
},
},
];
Loading

0 comments on commit 2ac8dc8

Please sign in to comment.