Skip to content

Commit 57620c6

Browse files
authored
Merge pull request #7 from scheduleonce/hurricanes/basic-rules
TSLint Compatible rules
2 parents d038c86 + e4f41af commit 57620c6

File tree

4 files changed

+28
-5
lines changed

4 files changed

+28
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Introduction
22
=
33
ESLint configuration for micro-services built using Node.js and TypeScript.
44

5-
The configuration extends `eslint-config-google`, `eslint-plugin-sonarjs`, `prettier` ESLint configurations. It also uses `@typescript-eslint` plugin.
5+
The configuration extends `@typescript-eslint/recommended`, `eslint-plugin-sonarjs`, `prettier` ESLint configurations.
66

77
## Installation
88
Using **NPM**

index.js

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = {
44
'node': true,
55
},
66
'extends': [
7-
'google',
7+
'plugin:@typescript-eslint/recommended',
88
'plugin:sonarjs/recommended',
99
'prettier'
1010
],
@@ -20,5 +20,28 @@ module.exports = {
2020
'plugins': [
2121
'@typescript-eslint',
2222
'sonarjs'
23-
]
23+
],
24+
'overrides': [
25+
{
26+
'files': ['**/*(specs|tests)/**', '**/*.spec.ts'],
27+
'rules': {
28+
'@typescript-eslint/no-empty-function': 'off',
29+
'sonarjs/no-identical-functions': 'off',
30+
'sonarjs/no-duplicate-string': 'off'
31+
}
32+
}
33+
],
34+
'rules': {
35+
'@typescript-eslint/no-use-before-define': 'off',
36+
'@typescript-eslint/no-inferrable-types': 'off',
37+
'@typescript-eslint/explicit-function-return-type': 'error',
38+
'@typescript-eslint/no-unused-vars': 'error',
39+
'@typescript-eslint/no-explicit-any': 'error',
40+
'@typescript-eslint/interface-name-prefix': 'off',
41+
'@typescript-eslint/consistent-type-assertions': ['error', {
42+
assertionStyle: 'angle-bracket'
43+
}],
44+
'@typescript-eslint/no-explicit-any': 'off',
45+
'@typescript-eslint/explicit-function-return-type': 'off'
46+
}
2447
};

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@oncehub/eslint-config",
3-
"version": "1.0.3",
3+
"version": "1.1.0",
44
"description": "ESLint configuration for micro-services built using Node.js and TypeScript",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)