Skip to content

Commit

Permalink
Merge pull request #507 from IvanPostu/enhancement-506
Browse files Browse the repository at this point in the history
enhancement-506: Add eslint with prettier plugin and integrate it in preversion/release pipeline (Part 1 - config)
  • Loading branch information
wuda-io authored Nov 6, 2024
2 parents 4899308 + 9f9aace commit bd1284d
Show file tree
Hide file tree
Showing 5 changed files with 1,259 additions and 50 deletions.
26 changes: 0 additions & 26 deletions .eslintrc

This file was deleted.

2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"printWidth": 100,
"parser": "flow",
"parser": "typescript",
"tabWidth": 2,
"useTabs": false,
"semi": true,
Expand Down
35 changes: 35 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import typescriptEslint from 'typescript-eslint';
import prettierPlugin from 'eslint-plugin-prettier';
import eslintConfigPrettier from 'eslint-config-prettier';

export default [
{
files: ['src/**/*.{ts,js,mjs}'],
ignores: ['dist', 'node_modules']
},
...typescriptEslint.configs.recommended,
{
plugins: {
prettier: prettierPlugin
},
rules: {
...prettierPlugin.configs.recommended.rules,
...eslintConfigPrettier.rules,

// TODO: to improve because the basic rules cause
// thousands of errors, for this reason, they have been marked as WARN
'prettier/prettier': 'warn',

'prefer-const': 'warn',
'prefer-rest-params': 'warn',
'no-var': 'warn',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-unused-expressions': 'warn',
'@typescript-eslint/no-this-alias': 'warn',
'@typescript-eslint/no-empty-object-type': 'warn',
'@typescript-eslint/no-require-imports': 'warn',
'@typescript-eslint/no-unsafe-function-type': 'warn'
}
}
];
Loading

0 comments on commit bd1284d

Please sign in to comment.