Skip to content

Commit afb3900

Browse files
add linter
ISSUE: CLDSRVCLT-2
1 parent 337a753 commit afb3900

File tree

3 files changed

+644
-11
lines changed

3 files changed

+644
-11
lines changed

.eslintrc.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
extends: [
4+
'eslint:recommended',
5+
'plugin:@typescript-eslint/recommended',
6+
],
7+
parserOptions: {
8+
ecmaVersion: 2020,
9+
sourceType: 'module',
10+
},
11+
env: {
12+
node: true,
13+
es6: true,
14+
jest: true,
15+
},
16+
ignorePatterns: [
17+
'node_modules/',
18+
'build/',
19+
'dist/',
20+
'*.js',
21+
],
22+
rules: {
23+
'@typescript-eslint/no-explicit-any': 'warn',
24+
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
25+
},
26+
};

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,18 @@
1717
"build:generated": "cd build/smithy/source/typescript-codegen && yarn install && yarn build",
1818
"build:wrapper": "tsc",
1919
"build": "yarn install && yarn clean:build && yarn build:smithy && yarn build:generated && yarn build:wrapper",
20-
"test": "jest"
20+
"test": "jest",
21+
"lint": "eslint . --ext .ts,.tsx",
22+
"typecheck": "tsc --noEmit"
2123
},
2224
"devDependencies": {
2325
"typescript": "^5.7.3",
2426
"@types/jest": "^30.0.0",
2527
"jest": "^30.2.0",
26-
"ts-jest": "^29.4.4"
28+
"ts-jest": "^29.4.4",
29+
"eslint": "^8.57.0",
30+
"@typescript-eslint/eslint-plugin": "^6.21.0",
31+
"@typescript-eslint/parser": "^6.21.0"
2732
},
2833
"dependencies": {
2934
"fast-xml-parser": "^4.3.2",

0 commit comments

Comments
 (0)