Skip to content

Commit

Permalink
Merge pull request #292 from nestjs/feat/tslint-to-eslint
Browse files Browse the repository at this point in the history
feat(): migrate from tslint to eslint
  • Loading branch information
kamilmysliwiec committed Jan 26, 2020
2 parents 7d064ad + 07a7234 commit 840a43f
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 96 deletions.
36 changes: 0 additions & 36 deletions package-lock.json

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

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
"release-it": "^12.4.3",
"ts-jest": "25.0.0",
"ts-node": "8.6.2",
"tslint": "5.20.1",
"typescript": "3.7.5"
},
"peerDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions src/lib/application/application.factory.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ describe('Application Factory', () => {
const tree: UnitTestTree = runner.runSchematic('application', options);
const files: string[] = tree.files;
expect(files).toEqual([
'/project/.eslintrc.js',
'/project/.gitignore',
'/project/.prettierrc',
'/project/README.md',
'/project/nest-cli.json',
'/project/package.json',
'/project/tsconfig.build.json',
'/project/tsconfig.json',
'/project/tslint.json',
'/project/src/app.controller.spec.ts',
'/project/src/app.controller.ts',
'/project/src/app.module.ts',
Expand All @@ -41,14 +41,14 @@ describe('Application Factory', () => {
const tree: UnitTestTree = runner.runSchematic('application', options);
const files: string[] = tree.files;
expect(files).toEqual([
'/awesome-project/.eslintrc.js',
'/awesome-project/.gitignore',
'/awesome-project/.prettierrc',
'/awesome-project/README.md',
'/awesome-project/nest-cli.json',
'/awesome-project/package.json',
'/awesome-project/tsconfig.build.json',
'/awesome-project/tsconfig.json',
'/awesome-project/tslint.json',
'/awesome-project/src/app.controller.spec.ts',
'/awesome-project/src/app.controller.ts',
'/awesome-project/src/app.module.ts',
Expand Down Expand Up @@ -92,14 +92,14 @@ describe('Application Factory', () => {
const tree: UnitTestTree = runner.runSchematic('application', options);
const files: string[] = tree.files;
expect(files).toEqual([
'/scope-package/.eslintrc.js',
'/scope-package/.gitignore',
'/scope-package/.prettierrc',
'/scope-package/README.md',
'/scope-package/nest-cli.json',
'/scope-package/package.json',
'/scope-package/tsconfig.build.json',
'/scope-package/tsconfig.json',
'/scope-package/tslint.json',
'/scope-package/src/app.controller.spec.ts',
'/scope-package/src/app.controller.ts',
'/scope-package/src/app.module.ts',
Expand Down
12 changes: 6 additions & 6 deletions src/lib/application/files/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@
"test:e2e": "jest --config ./test/jest-e2e.json"
},
"dependencies": {
"@nestjs/common": "^6.7.2",
"@nestjs/core": "^6.7.2",
"@nestjs/platform-express": "^6.7.2",
"@nestjs/common": "^6.10.14",
"@nestjs/core": "^6.10.14",
"@nestjs/platform-express": "^6.10.14",
"reflect-metadata": "^0.1.13",
"rxjs": "^6.5.3"
"rxjs": "^6.5.4"
},
"devDependencies": {
"@nestjs/testing": "^6.7.2",
"@nestjs/testing": "^6.10.14",
"@babel/core": "^7.6.2",
"@babel/node": "^7.6.2",
"@babel/plugin-proposal-decorators": "^7.6.0",
"@babel/plugin-transform-runtime": "^7.6.2",
"@babel/preset-env": "^7.6.2",
"@babel/register": "^7.6.2",
"@babel/runtime": "^7.6.2",
"jest": "25.1.0",
"jest": "^25.1.0",
"nodemon": "^1.19.2",
"prettier": "^1.18.2",
"supertest": "^4.0.2"
Expand Down
24 changes: 24 additions & 0 deletions src/lib/application/files/ts/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'prettier/@typescript-eslint',
],
root: true,
env: {
node: true,
jest: true,
},
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
};
38 changes: 21 additions & 17 deletions src/lib/application/files/ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,42 @@
"start:dev": "nest start --watch",
"start:debug": "nest start --debug --watch",
"start:prod": "node dist/main",
"lint": "tslint -p tsconfig.json -c tslint.json",
"lint": "eslint '{src,apps,libs,test}/**/*.ts' --fix",
"test": "jest",
"test:watch": "jest --watch",
"test:cov": "jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --config ./test/jest-e2e.json"
},
"dependencies": {
"@nestjs/common": "^6.7.2",
"@nestjs/core": "^6.7.2",
"@nestjs/platform-express": "^6.7.2",
"@nestjs/common": "^6.10.14",
"@nestjs/core": "^6.10.14",
"@nestjs/platform-express": "^6.10.14",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.0",
"rxjs": "^6.5.3"
"rxjs": "^6.5.4"
},
"devDependencies": {
"@nestjs/cli": "^6.9.0",
"@nestjs/schematics": "^6.7.0",
"@nestjs/testing": "^6.7.1",
"@types/express": "^4.17.1",
"@types/jest": "^24.0.18",
"@types/node": "^12.7.5",
"@nestjs/cli": "^6.13.2",
"@nestjs/schematics": "^6.8.1",
"@nestjs/testing": "^6.10.14",
"@types/express": "^4.17.2",
"@types/jest": "^24.0.25",
"@types/node": "^13.1.6",
"@types/supertest": "^2.0.8",
"jest": "25.1.0",
"@typescript-eslint/eslint-plugin": "^2.12.0",
"@typescript-eslint/parser": "^2.12.0",
"eslint": "^6.7.2",
"eslint-config-prettier": "^6.7.0",
"eslint-plugin-import": "^2.19.1",
"jest": "^24.9.0",
"prettier": "^1.18.2",
"supertest": "^4.0.2",
"ts-jest": "25.0.0",
"ts-loader": "^6.1.1",
"ts-node": "^8.4.1",
"ts-jest": "^24.3.0",
"ts-loader": "^6.2.1",
"ts-node": "^8.6.0",
"tsconfig-paths": "^3.9.0",
"tslint": "^5.20.0",
"typescript": "^3.6.3"
"typescript": "^3.7.4"
},
"jest": {
"moduleFileExtensions": [
Expand Down
18 changes: 0 additions & 18 deletions src/lib/application/files/ts/tslint.json

This file was deleted.

3 changes: 0 additions & 3 deletions src/lib/library/files/ts/tslint.json

This file was deleted.

2 changes: 0 additions & 2 deletions src/lib/library/library.factory.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ describe('Library Factory', () => {
expect(files).toEqual([
'/nest-cli.json',
'/libs/project/tsconfig.lib.json',
'/libs/project/tslint.json',
'/libs/project/src/index.ts',
'/libs/project/src/project.module.ts',
'/libs/project/src/project.service.spec.ts',
Expand All @@ -37,7 +36,6 @@ describe('Library Factory', () => {
expect(files).toEqual([
'/nest-cli.json',
'/libs/awesome-project/tsconfig.lib.json',
'/libs/awesome-project/tslint.json',
'/libs/awesome-project/src/index.ts',
'/libs/awesome-project/src/awesome-project.module.ts',
'/libs/awesome-project/src/awesome-project.service.spec.ts',
Expand Down
3 changes: 0 additions & 3 deletions src/lib/sub-app/files/ts/tslint.json

This file was deleted.

4 changes: 0 additions & 4 deletions src/lib/sub-app/sub-app.factory.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ describe('SubApp Factory', () => {
expect(files).toEqual([
'/nest-cli.json',
'/apps/nestjs-schematics/tsconfig.app.json',
'/apps/nestjs-schematics/tslint.json',
'/apps/project/tsconfig.app.json',
'/apps/project/tslint.json',
'/apps/project/src/app.controller.spec.ts',
'/apps/project/src/app.controller.ts',
'/apps/project/src/app.module.ts',
Expand All @@ -40,9 +38,7 @@ describe('SubApp Factory', () => {
expect(files).toEqual([
'/nest-cli.json',
'/apps/nestjs-schematics/tsconfig.app.json',
'/apps/nestjs-schematics/tslint.json',
'/apps/awesome-project/tsconfig.app.json',
'/apps/awesome-project/tslint.json',
'/apps/awesome-project/src/app.controller.spec.ts',
'/apps/awesome-project/src/app.controller.ts',
'/apps/awesome-project/src/app.module.ts',
Expand Down
3 changes: 0 additions & 3 deletions src/lib/sub-app/workspace/ts/tslint.json

This file was deleted.

0 comments on commit 840a43f

Please sign in to comment.