@oncehub/eslint-config 1.1.1 → 2.1.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -25
- package/index.js +46 -46
- package/oncehub-eslint-config-2.1.1-beta.1.tgz +0 -0
- package/package.json +27 -27
package/README.md
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
Introduction
|
|
2
|
-
=
|
|
3
|
-
ESLint configuration for micro-services built using Node.js and TypeScript.
|
|
4
|
-
|
|
5
|
-
The configuration extends `@typescript-eslint/recommended`, `eslint-plugin-sonarjs`, `prettier` ESLint configurations.
|
|
6
|
-
|
|
7
|
-
## Installation
|
|
8
|
-
Using **NPM**
|
|
9
|
-
```sh
|
|
10
|
-
npm i --save-dev @oncehub/eslint-config
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Using **Yarn**
|
|
14
|
-
```sh
|
|
15
|
-
yarn add --dev @oncehub/eslint-config
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## Usage
|
|
19
|
-
In your `.eslintrc` file, put `@oncehub/eslint-config` under `extends` array as shown below.
|
|
20
|
-
```js
|
|
21
|
-
module.exports = {
|
|
22
|
-
'extends': [
|
|
23
|
-
'@oncehub/eslint-config'
|
|
24
|
-
]
|
|
25
|
-
};
|
|
1
|
+
Introduction
|
|
2
|
+
=
|
|
3
|
+
ESLint configuration for micro-services built using Node.js and TypeScript.
|
|
4
|
+
|
|
5
|
+
The configuration extends `@typescript-eslint/recommended`, `eslint-plugin-sonarjs`, `prettier` ESLint configurations.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
Using **NPM**
|
|
9
|
+
```sh
|
|
10
|
+
npm i --save-dev @oncehub/eslint-config
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Using **Yarn**
|
|
14
|
+
```sh
|
|
15
|
+
yarn add --dev @oncehub/eslint-config
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
In your `.eslintrc` file, put `@oncehub/eslint-config` under `extends` array as shown below.
|
|
20
|
+
```js
|
|
21
|
+
module.exports = {
|
|
22
|
+
'extends': [
|
|
23
|
+
'@oncehub/eslint-config'
|
|
24
|
+
]
|
|
25
|
+
};
|
|
26
26
|
```
|
package/index.js
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
'env': {
|
|
3
|
-
'es6': true,
|
|
4
|
-
'node': true,
|
|
5
|
-
},
|
|
6
|
-
'extends': [
|
|
7
|
-
'plugin:@typescript-eslint/recommended',
|
|
8
|
-
'plugin:sonarjs/recommended',
|
|
9
|
-
'prettier'
|
|
10
|
-
],
|
|
11
|
-
'globals': {
|
|
12
|
-
'Atomics': 'readonly',
|
|
13
|
-
'SharedArrayBuffer': 'readonly',
|
|
14
|
-
},
|
|
15
|
-
'parser': '@typescript-eslint/parser',
|
|
16
|
-
'parserOptions': {
|
|
17
|
-
'ecmaVersion': 2018,
|
|
18
|
-
'sourceType': 'module',
|
|
19
|
-
},
|
|
20
|
-
'plugins': [
|
|
21
|
-
'@typescript-eslint',
|
|
22
|
-
'sonarjs'
|
|
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
|
-
}
|
|
1
|
+
module.exports = {
|
|
2
|
+
'env': {
|
|
3
|
+
'es6': true,
|
|
4
|
+
'node': true,
|
|
5
|
+
},
|
|
6
|
+
'extends': [
|
|
7
|
+
'plugin:@typescript-eslint/recommended',
|
|
8
|
+
'plugin:sonarjs/recommended',
|
|
9
|
+
'prettier'
|
|
10
|
+
],
|
|
11
|
+
'globals': {
|
|
12
|
+
'Atomics': 'readonly',
|
|
13
|
+
'SharedArrayBuffer': 'readonly',
|
|
14
|
+
},
|
|
15
|
+
'parser': '@typescript-eslint/parser',
|
|
16
|
+
'parserOptions': {
|
|
17
|
+
'ecmaVersion': 2018,
|
|
18
|
+
'sourceType': 'module',
|
|
19
|
+
},
|
|
20
|
+
'plugins': [
|
|
21
|
+
'@typescript-eslint',
|
|
22
|
+
'sonarjs'
|
|
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
|
+
}
|
|
47
47
|
};
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@oncehub/eslint-config",
|
|
3
|
-
"version": "1.1.1",
|
|
4
|
-
"description": "ESLint configuration for micro-services built using Node.js and TypeScript",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
-
},
|
|
9
|
-
"author": "Rajat Saxena <rajat.saxena@oncehub.com>",
|
|
10
|
-
"license": "ISC",
|
|
11
|
-
"dependencies": {
|
|
12
|
-
"eslint": "
|
|
13
|
-
"typescript": "
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"eslint-
|
|
17
|
-
"
|
|
18
|
-
},
|
|
19
|
-
"repository": {
|
|
20
|
-
"type": "git",
|
|
21
|
-
"url": "git+https://github.com/scheduleonce/eslint-config-oncehub.git"
|
|
22
|
-
},
|
|
23
|
-
"bugs": {
|
|
24
|
-
"url": "https://github.com/scheduleonce/eslint-config-oncehub/issues"
|
|
25
|
-
},
|
|
26
|
-
"homepage": "https://github.com/scheduleonce/eslint-config-oncehub#readme"
|
|
27
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@oncehub/eslint-config",
|
|
3
|
+
"version": "2.1.1-beta.1",
|
|
4
|
+
"description": "ESLint configuration for micro-services built using Node.js and TypeScript",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"author": "Rajat Saxena <rajat.saxena@oncehub.com>",
|
|
10
|
+
"license": "ISC",
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@typescript-eslint/eslint-plugin": "^5.6.0",
|
|
13
|
+
"@typescript-eslint/parser": "^5.6.0",
|
|
14
|
+
"eslint": "^8.4.1",
|
|
15
|
+
"eslint-config-prettier": "^8.3.0",
|
|
16
|
+
"eslint-plugin-sonarjs": "^0.11.0",
|
|
17
|
+
"typescript": "^4.1.3"
|
|
18
|
+
},
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/scheduleonce/eslint-config-oncehub.git"
|
|
22
|
+
},
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/scheduleonce/eslint-config-oncehub/issues"
|
|
25
|
+
},
|
|
26
|
+
"homepage": "https://github.com/scheduleonce/eslint-config-oncehub#readme"
|
|
27
|
+
}
|