Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add code linting and prettify #1350

Merged
merged 25 commits into from
Jul 13, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
952c1aa
feat: add eslint and prettier config
alexforsyth Jul 8, 2020
860ac2a
fix: auto lint fixes
alexforsyth Jul 8, 2020
716b289
fix: manual configuration and code updates for eslint
alexforsyth Jul 9, 2020
ac0a1e4
fix: automatically fixed by eslint
alexforsyth Jul 9, 2020
3ed0d03
fix: properly build, tighten eslint rules
alexforsyth Jul 9, 2020
df9de13
fix: tslint building properly
alexforsyth Jul 9, 2020
22c318d
fix: manual linter fixes
alexforsyth Jul 9, 2020
c146f6f
fix: merge-commit
alexforsyth Jul 9, 2020
0823304
fix: merge conflict + lint
alexforsyth Jul 9, 2020
69a231b
feat: add prettify command
alexforsyth Jul 9, 2020
a525b24
feat: prettify codebase
alexforsyth Jul 9, 2020
64584cc
fix: clean up tsconfig
alexforsyth Jul 10, 2020
1be752d
fix: remove prettier from scripts
alexforsyth Jul 10, 2020
7963f82
Revert "feat: prettify codebase"
alexforsyth Jul 10, 2020
107863f
chore: merging in files
alexforsyth Jul 10, 2020
3d2b012
fix: automatic linting fixes
alexforsyth Jul 10, 2020
0061a72
fix: manual resolution of linter errors and warnings
alexforsyth Jul 10, 2020
9f14d9c
fix: automatic linter fixes round 2
alexforsyth Jul 10, 2020
1fb7062
feat: manual resolution of eslint errors
alexforsyth Jul 10, 2020
93a2beb
fix: clients update from upstream
alexforsyth Jul 10, 2020
7450229
fix: lint fix protocol_tests
alexforsyth Jul 10, 2020
a71b037
fix: use exact versions package.json
alexforsyth Jul 10, 2020
33eb6a7
fix: unprettify hooks
alexforsyth Jul 10, 2020
bc4ea50
fix: lockfile update
alexforsyth Jul 13, 2020
528597c
Merge branch 'master' into alexforsyth/common-linter
trivikr Jul 13, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
parser: "@typescript-eslint/parser", // Specifies the ESLint parser
parserOptions: {
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
sourceType: "module" // Allows for the use of imports
},
extends: [
"plugin:@typescript-eslint/recommended" // Uses the recommended rules from the @typescript-eslint/eslint-plugin
],
rules: {
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
// e.g. "@typescript-eslint/explicit-function-return-type": "off",
}
};
7 changes: 7 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
Copy link
Contributor Author

@alexforsyth alexforsyth Jul 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is added by mistake, removed here: 716b289

semi: true,
trailingComma: "all",
singleQuote: true,
printWidth: 120,
tabWidth: 4
};
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"test:integration-legacy": "cucumber-js --fail-fast",
"test:integration": "jest --config jest.config.integ.js --passWithNoTests",
"test:protocols": "yarn build:protocols && lerna run test --scope '@aws-sdk/aws-*'",
"local-publish": "node ./scripts/verdaccio-publish/index.js"
"local-publish": "node ./scripts/verdaccio-publish/index.js",
"lint": "eslint 'packages/**/src/*.ts' --quiet --fix"
},
"repository": {
"type": "git",
Expand All @@ -42,10 +43,15 @@
"@types/chai-as-promised": "^7.1.2",
"@types/fs-extra": "^8.0.1",
"@types/jest": "^26.0.4",
"@typescript-eslint/eslint-plugin": "^3.6.0",
"@typescript-eslint/parser": "^3.6.0",
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"codecov": "^3.4.0",
"cucumber": "^6.0.5",
"eslint": "^7.4.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.4",
"fs-extra": "^9.0.0",
"generate-changelog": "^1.7.1",
"husky": "^4.2.3",
Expand All @@ -66,7 +72,7 @@
"lerna": "3.22.1",
"lint-staged": "^10.0.1",
"mocha": "^8.0.1",
"prettier": "2.0.5",
"prettier": "^2.0.5",
alexforsyth marked this conversation as resolved.
Show resolved Hide resolved
"puppeteer": "^4.0.0",
"ts-loader": "^7.0.5",
"typescript": "~3.8.3",
Expand Down
10 changes: 7 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@
"noUnusedParameters": false,
"removeComments": false,
"incremental": true,
/**
* Nice to have:
*/
// "preserveConstEnums": true,
"noImplicitAny": true,
// "sourceMap": true,
"noUnusedLocals": true,
// "noImplicitReturns": true,
// "noImplicitThis": true,
// "alwaysStrict": true,
// "noFallthroughCasesInSwitch": true,
"module": "commonjs",
"moduleResolution": "node",
"target": "es5",
Expand Down
Loading