Skip to content

Add lint support through leveraging "ESLint" #560

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 16 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
parserOptions: {
sourceType: "module",
},

/**
* ESLint rules
*
* All available rules: http://eslint.org/docs/rules/
*/
rules: {
"no-extra-semi": "error",
},
};
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@ node_modules
# OSX
.DS_Store

# ESlint Cache
.eslintcache
2 changes: 1 addition & 1 deletion api/WebApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function getHandlerFromToken(token: string, allowCrossOriginAuthenticatio
export interface IWebApiRequestSettings {
productName: string,
productVersion: string
};
}

// ---------------------------------------------------------------------------
// Factory to return client apis
Expand Down
2 changes: 1 addition & 1 deletion api/interfaces/common/VsoBaseInterfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export interface ApiResourceLocation {
routeTemplate: string;
}

export interface IHeaders { [key: string]: any };
export interface IHeaders { [key: string]: any }

export interface IBasicCredentials {
username: string;
Expand Down
5 changes: 5 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ steps:
- script: npm run units
displayName: Run unit tests

- script: npm run lint
displayName: Run lint (ESlint)
# Only perform linting for Higher than Node 12
condition: and(succeeded(), eq(variables['versionSpec'], '12.x', '14.x', '16.x'))

# For CI runs on master, automatically publish packages
- bash: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
Expand Down
Loading