Permalink
Browse files

build: enable eslint checks for ci builds (#67)

  • Loading branch information...
armano2 authored and JamesHenry committed Jan 21, 2019
1 parent 09f67ff commit 378fbe59ed1126532420c0a65b0d2f5e93410a1d
@@ -0,0 +1,8 @@
node_modules
dist
jest.config.js
fixtures
coverage

packages/typescript-estree/src/estree
packages/eslint-plugin-tslint/tests
@@ -0,0 +1,68 @@
{
"root": true,
"plugins": ["eslint-plugin", "@typescript-eslint", "jest"],
"env": {
"es6": true,
"node": true
},
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"rules": {
"no-mixed-operators": "error",
"no-console": "off",
"no-undef": "off",
"@typescript-eslint/indent": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-object-literal-type-assertion": "off",
"@typescript-eslint/no-parameter-properties": "off"
},
"parserOptions": {
"sourceType": "module",
"ecmaFeatures": {
"jsx": false
}
},
"overrides": [
{
"files": [
"packages/eslint-plugin-tslint/**/*.ts",
"packages/eslint-plugin-typescript/**/*.js",
"packages/typescript-eslint-parser/**/*.ts",
"packages/typescript-estree/**/*.ts"
],
"env": {
"jest/globals": true
},
"rules": {
"jest/no-disabled-tests": "warn",
"jest/no-focused-tests": "error",
"jest/no-identical-title": "error",
"jest/prefer-to-have-length": "warn",
"jest/valid-expect": "error"
}
},
{
"files": ["packages/eslint-plugin-typescript/**/*.js"],
"rules": {
"eslint-plugin/fixer-return": "error",
"eslint-plugin/no-identical-tests": "error",
"eslint-plugin/no-missing-placeholders": "error",
"eslint-plugin/no-unused-placeholders": "error",
"eslint-plugin/no-useless-token-range": "error",
"eslint-plugin/require-meta-fixable": "error",
"eslint-plugin/prefer-placeholders": "error",
"eslint-plugin/prefer-replace-text": "error",
"eslint-plugin/no-deprecated-report-api": "error",
"eslint-plugin/report-message-format": ["error", "^[A-Z'{].*[\\.}]$"],
"eslint-plugin/no-deprecated-context-methods": "error",
"eslint-plugin/prefer-output-null": "error",
"eslint-plugin/test-case-shorthand-strings": "error",
"eslint-plugin/require-meta-type": "error"
}
}
]
}
@@ -3,7 +3,7 @@
<p align="center">Monorepo for all the tooling which enables ESLint to support TypeScript</p>

<p align="center">
<a href="https://travis-ci.com/typescript-eslint/typescript-eslint"><img src="https://img.shields.io/travis/com/typescript-eslint/typescript-eslint.svg?style=flat-square" alt="Travis"/></a>
<a href="https://dev.azure.com/typescript-eslint/TypeScript%20ESLint/_build/latest?definitionId=1&branchName=master"><img src="https://img.shields.io/azure-devops/build/typescript-eslint/TypeScript%20ESLint/1/master.svg?label=%F0%9F%9A%80%20Azure%20Pipelines&style=flat-square" alt="Azure Pipelines"/></a>
<a href="https://github.com/typescript-eslint/typescript-eslint/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/typescript-estree.svg?style=flat-square" alt="GitHub license" /></a>
<a href="https://www.npmjs.com/package/@typescript-eslint/typescript-estree"><img src="https://img.shields.io/npm/dm/@typescript-eslint/typescript-estree.svg?style=flat-square" alt="NPM Downloads" /></a>
<a href="https://codecov.io/gh/typescript-eslint/typescript-eslint"><img alt="Codecov" src="https://img.shields.io/codecov/c/github/typescript-eslint/typescript-eslint.svg?style=flat-square"></a>
@@ -21,6 +21,10 @@ jobs:
yarn check-format
displayName: 'Check code formatting'
- script: |
yarn lint
displayName: 'Run linting'
- script: |
yarn test
displayName: 'Run unit tests'
@@ -22,6 +22,8 @@
"build": "lerna run build",
"clean": "lerna clean && lerna run clean",
"precommit": "yarn test && lint-staged",
"lint": "eslint . --ext .js,.ts",
"lint-fix": "eslint . --ext .js,.ts --fix",
"cz": "git-cz",
"commitmsg": "commitlint -E GIT_PARAMS",
"check-format": "prettier --list-different \"./**/*.{ts,js,json,md}\"",
@@ -63,6 +65,8 @@
"@types/semver": "^5.5.0",
"cz-conventional-changelog": "2.1.0",
"eslint": "^5.12.1",
"eslint-plugin-jest": "^22.1.3",
"eslint-plugin-eslint-plugin": "^2.0.1",
"glob": "7.1.2",
"husky": "0.14.3",
"jest": "23.6.0",
@@ -3,7 +3,7 @@
<p align="center">ESLint plugin wraps a TSLint configuration and lints the whole source using TSLint.</p>

<p align="center">
<a href="https://travis-ci.com/typescript-eslint/typescript-eslint"><img src="https://img.shields.io/travis/com/typescript-eslint/typescript-eslint.svg?style=flat-square" alt="Travis"/></a>
<a href="https://dev.azure.com/typescript-eslint/TypeScript%20ESLint/_build/latest?definitionId=1&branchName=master"><img src="https://img.shields.io/azure-devops/build/typescript-eslint/TypeScript%20ESLint/1/master.svg?label=%F0%9F%9A%80%20Azure%20Pipelines&style=flat-square" alt="Azure Pipelines"/></a>
<a href="https://github.com/typescript-eslint/typescript-eslint/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/typescript-estree.svg?style=flat-square" alt="GitHub license" /></a>
<a href="https://www.npmjs.com/package/@typescript-eslint/eslint-plugin-tslint"><img src="https://img.shields.io/npm/v/@typescript-eslint/eslint-plugin-tslint.svg?style=flat-square" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/package/@typescript-eslint/eslint-plugin-tslint"><img src="https://img.shields.io/npm/dm/@typescript-eslint/eslint-plugin-tslint.svg?style=flat-square" alt="NPM Downloads" /></a>
@@ -1,7 +1,7 @@
<h1 align="center">ESLint Plugin TypeScript</h1>

<p align="center">
<a href="https://travis-ci.com/typescript-eslint/typescript-eslint"><img src="https://img.shields.io/travis/com/typescript-eslint/typescript-eslint.svg?style=flat-square" alt="Travis"/></a>
<a href="https://dev.azure.com/typescript-eslint/TypeScript%20ESLint/_build/latest?definitionId=1&branchName=master"><img src="https://img.shields.io/azure-devops/build/typescript-eslint/TypeScript%20ESLint/1/master.svg?label=%F0%9F%9A%80%20Azure%20Pipelines&style=flat-square" alt="Azure Pipelines"/></a>
<a href="https://github.com/typescript-eslint/typescript-eslint/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/typescript-estree.svg?style=flat-square" alt="GitHub license" /></a>
<a href="https://www.npmjs.com/package/@typescript-eslint/eslint-plugin"><img src="https://img.shields.io/npm/v/@typescript-eslint/eslint-plugin.svg?style=flat-square" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/package/@typescript-eslint/eslint-plugin"><img src="https://img.shields.io/npm/dm/@typescript-eslint/eslint-plugin.svg?style=flat-square" alt="NPM Downloads" /></a>
@@ -3,7 +3,7 @@
<p align="center">An ESLint custom parser which leverages <a href="https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/typescript-estree">TypeScript ESTree</a> to allow for ESLint to lint TypeScript source code.</p>

<p align="center">
<a href="https://travis-ci.com/typescript-eslint/typescript-eslint"><img src="https://img.shields.io/travis/com/typescript-eslint/typescript-eslint.svg?style=flat-square" alt="Travis"/></a>
<a href="https://dev.azure.com/typescript-eslint/TypeScript%20ESLint/_build/latest?definitionId=1&branchName=master"><img src="https://img.shields.io/azure-devops/build/typescript-eslint/TypeScript%20ESLint/1/master.svg?label=%F0%9F%9A%80%20Azure%20Pipelines&style=flat-square" alt="Azure Pipelines"/></a>
<a href="https://github.com/typescript-eslint/typescript-eslint/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/typescript-estree.svg?style=flat-square" alt="GitHub license" /></a>
<a href="https://www.npmjs.com/package/@typescript-eslint/parser"><img src="https://img.shields.io/npm/v/@typescript-eslint/parser.svg?style=flat-square" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/package/@typescript-eslint/parser"><img src="https://img.shields.io/npm/dm/@typescript-eslint/parser.svg?style=flat-square" alt="NPM Downloads" /></a>
@@ -3,7 +3,7 @@
<p align="center">A parser that converts TypeScript source code into an <a href="https://github.com/estree/estree">ESTree</a>-compatible form</p>

<p align="center">
<a href="https://travis-ci.com/typescript-eslint/typescript-eslint"><img src="https://img.shields.io/travis/com/typescript-eslint/typescript-eslint.svg?style=flat-square" alt="Travis"/></a>
<a href="https://dev.azure.com/typescript-eslint/TypeScript%20ESLint/_build/latest?definitionId=1&branchName=master"><img src="https://img.shields.io/azure-devops/build/typescript-eslint/TypeScript%20ESLint/1/master.svg?label=%F0%9F%9A%80%20Azure%20Pipelines&style=flat-square" alt="Azure Pipelines"/></a>
<a href="https://github.com/typescript-eslint/typescript-eslint/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/typescript-estree.svg?style=flat-square" alt="GitHub license" /></a>
<a href="https://www.npmjs.com/package/@typescript-eslint/typescript-estree"><img src="https://img.shields.io/npm/v/@typescript-eslint/typescript-estree.svg?style=flat-square" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/package/@typescript-eslint/typescript-estree"><img src="https://img.shields.io/npm/dm/@typescript-eslint/typescript-estree.svg?style=flat-square" alt="NPM Downloads" /></a>
@@ -236,7 +236,7 @@ export function preprocessBabylonAST(ast: any): any {
* Babel: ClassProperty + abstract: true
* ts-estree: TSAbstractClassProperty
*/
ClassProperty(node: any, parent: any) {
ClassProperty(node: any) {
if (node.abstract) {
node.type = 'TSAbstractClassProperty';
delete node.abstract;

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 378fbe5

Please sign in to comment.