Skip to content

Commit

Permalink
Configure ESLint and update configuration for Prettier (actions#949)
Browse files Browse the repository at this point in the history
* Update ESLint and Prettier configurations

* Rebuild action

* Update package.json
  • Loading branch information
IvanZosimov authored Mar 9, 2023
1 parent 3d90444 commit 47a58a6
Show file tree
Hide file tree
Showing 15 changed files with 3,775 additions and 5,507 deletions.
9 changes: 6 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
dist/
lib/
node_modules/
# Ignore list
/*

# Do not ignore these folders:
!__tests__/
!src/
49 changes: 49 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:eslint-plugin-jest/recommended',
'eslint-config-prettier'
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'eslint-plugin-jest'],
rules: {
'@typescript-eslint/no-require-imports': 'error',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-ignore': 'allow-with-description'
}
],
'no-console': 'error',
'yoda': 'error',
'prefer-const': [
'error',
{
destructuring: 'all'
}
],
'no-control-regex': 'off',
'no-constant-condition': ['error', {checkLoops: false}]
},
overrides: [
{
files: ['**/*{test,spec}.ts'],
rules: {
'@typescript-eslint/no-unused-vars': 'off',
'jest/no-standalone-expect': 'off',
'jest/no-conditional-expect': 'off',
'no-console': 'off',

}
}
],
env: {
node: true,
es6: true,
'jest/globals': true
}
};
65 changes: 0 additions & 65 deletions .eslintrc.json

This file was deleted.

1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* text=auto eol=lf
.licenses/** -diff linguist-generated=true
14 changes: 7 additions & 7 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.idea
.licenses
.vscode
dist
lib
node_modules
package-lock.json
# Ignore list
/*

# Do not ignore these folders:
!__tests__/
!.github/
!src/
10 changes: 10 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
printWidth: 80,
tabWidth: 2,
useTabs: false,
semi: true,
singleQuote: true,
trailingComma: 'none',
bracketSpacing: false,
arrowParens: 'avoid'
};
11 changes: 0 additions & 11 deletions .prettierrc.json

This file was deleted.

Loading

0 comments on commit 47a58a6

Please sign in to comment.