Skip to content

Commit f0758e1

Browse files
feat(): migrate to eslint
1 parent f163e3a commit f0758e1

8 files changed

+5128
-832
lines changed

.commitlintrc.json

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"extends": ["@commitlint/config-angular"],
3+
"rules": {
4+
"subject-case": [
5+
2,
6+
"always",
7+
["sentence-case", "start-case", "pascal-case", "upper-case", "lower-case"]
8+
],
9+
"type-enum": [
10+
2,
11+
"always",
12+
[
13+
"build",
14+
"chore",
15+
"ci",
16+
"docs",
17+
"feat",
18+
"fix",
19+
"perf",
20+
"refactor",
21+
"revert",
22+
"style",
23+
"test",
24+
"sample"
25+
]
26+
]
27+
}
28+
}

.eslintrc.js

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
parserOptions: {
4+
project: 'tsconfig.json',
5+
sourceType: 'module',
6+
},
7+
plugins: ['@typescript-eslint/eslint-plugin'],
8+
extends: [
9+
'plugin:@typescript-eslint/eslint-recommended',
10+
'plugin:@typescript-eslint/recommended',
11+
'prettier',
12+
'prettier/@typescript-eslint',
13+
],
14+
root: true,
15+
env: {
16+
node: true,
17+
jest: true,
18+
},
19+
rules: {
20+
'@typescript-eslint/interface-name-prefix': 'off',
21+
'@typescript-eslint/explicit-function-return-type': 'off',
22+
'@typescript-eslint/no-explicit-any': 'off',
23+
'@typescript-eslint/no-use-before-define': 'off',
24+
},
25+
};

.npmignore

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
# source
22
lib
33
index.ts
4-
package-lock.json
5-
tslint.json
64
tsconfig.json
7-
.prettierrc
5+
6+
# misc
7+
.commitlintrc.json
8+
.prettierrc
9+
package-lock.json
10+
.eslintrc.js
11+
.release-it.json
12+
CONTRIBUTING.md

.release-it.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"git": {
3+
"commitMessage": "chore(): release v${version}"
4+
},
5+
"github": {
6+
"release": true
7+
}
8+
}

lib/interfaces/elasticsearch-module-options.interface.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { ClientOptions } from '@elastic/elasticsearch';
22
import { ModuleMetadata, Type } from '@nestjs/common/interfaces';
33

4-
export interface ElasticsearchModuleOptions extends ClientOptions {}
4+
export type ElasticsearchModuleOptions = ClientOptions;
55

66
export interface ElasticsearchOptionsFactory {
77
createElasticsearchOptions():

0 commit comments

Comments
 (0)