Skip to content

Commit

Permalink
eslint rules added
Browse files Browse the repository at this point in the history
  • Loading branch information
Tassneem04Hamdy committed Feb 19, 2023
1 parent 4f948f2 commit 957d999
Show file tree
Hide file tree
Showing 7 changed files with 186 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package.json
package-lock.json
node_modules
dist
build
43 changes: 41 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,52 @@
"browser": true,
"es2021": true
},
"extends": "standard-with-typescript",
"overrides": [
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"eslint-config-prettier"
],
"overrides": [],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"prettier"
],
"rules": {
"indent": [
"error",
"tab"
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
],
"max-len": [
"error",
120,
2,
{
"ignoreUrls": true,
"ignoreComments": false
}
],
"no-multiple-empty-lines": [
"error",
{
"max": 2
}
]
}
}
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"parser": "typescript",
"semi": true,
"trailingComma": "all",
"singleQuote": true,
"printWidth": 120,
"tabWidth": 4
}
14 changes: 14 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"files.eol": "\n",
"eslint.enable": true,
"editor.tabSize": 4,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.workingDirectories": [
{
"mode": "auto"
}
]
}
106 changes: 101 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 15 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"package": "pkg . --out-path ./build",
"clean": "rm -rf ./build",
"prerelease": "npm run package",
"release": "release-it"
"release": "release-it",
"lint": "eslint --ignore-path .eslintignore --ext .js,.ts ."
},
"repository": {
"type": "git",
Expand All @@ -30,18 +31,30 @@
"@typescript-eslint/eslint-plugin": "^5.52.0",
"@typescript-eslint/parser": "^5.52.0",
"eslint": "^8.34.0",
"eslint-config-prettier": "^8.6.0",
"eslint-config-standard-with-typescript": "^34.0.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-n": "^15.6.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.1.1",
"nodemon": "^2.0.20",
"pkg": "^5.8.0",
"prettier": "^2.8.4",
"ts-node": "^10.9.1",
"release-it": "^15.6.0",
"ts-node": "^10.9.1",
"typescript": "^4.9.5"
},
"dependencies": {
"commander": "^10.0.0"
},
"git": {
"commitMessage": "chore: release v${version}"
},
"github": {
"release": true,
"web": true,
"assets": [
"build/*"
]
}
}
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { Command } from 'commander';
const program = new Command();

program
.requiredOption('--contest <contest-id>', 'cf contest id')
.requiredOption('--api-key <api-key>', 'cf api key');
.requiredOption('--contest <contest-id>', 'cf contest id')
.requiredOption('--api-key <api-key>', 'cf api key');

program.parse(process.argv);

Expand Down

0 comments on commit 957d999

Please sign in to comment.