-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #579 from satanTime/issues/eslint
build(eslint): switching from tslint to eslint
- Loading branch information
Showing
193 changed files
with
6,793 additions
and
6,306 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
extends: | ||
- '@commitlint/config-conventional' | ||
- '@commitlint/config-conventional' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = space | ||
indent_size = 4 | ||
tab_width = 4 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
max_line_length = 120 | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = space | ||
indent_size = 2 | ||
tab_width = 2 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
max_line_length = 120 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"root": true, | ||
"ignorePatterns": ["projects/**/*"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts"], | ||
"parserOptions": { | ||
"project": ["tsconfig.json", "e2e/tsconfig.json"], | ||
"createDefaultProgram": true | ||
}, | ||
"extends": ["plugin:@angular-eslint/recommended", "plugin:@angular-eslint/template/process-inline-templates"], | ||
"rules": { | ||
"@angular-eslint/component-selector": [ | ||
"error", | ||
{ | ||
"prefix": "lib", | ||
"style": "kebab-case", | ||
"type": "element" | ||
} | ||
], | ||
"@angular-eslint/directive-selector": [ | ||
"error", | ||
{ | ||
"prefix": "lib", | ||
"style": "camelCase", | ||
"type": "attribute" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"files": ["*.html"], | ||
"extends": ["plugin:@angular-eslint/template/recommended"], | ||
"rules": {} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,40 @@ | ||
const path = require('path'); | ||
|
||
module.exports = { | ||
'*': filenames => { | ||
const commands = []; | ||
const cwd = process.cwd(); | ||
const files = filenames | ||
.filter(file => !file.match(/\.(ts)$/i)) | ||
.map(file => path.relative(cwd, file)) | ||
.map(file => `'${file}'`); | ||
if (files.length === 0) { | ||
return []; | ||
} | ||
'*': filenames => { | ||
const commands = []; | ||
const cwd = process.cwd(); | ||
const files = filenames | ||
.filter(file => !file.match(/\.(ts)$/i)) | ||
.map(file => path.relative(cwd, file)) | ||
.map(file => `'${file}'`); | ||
if (files.length === 0) { | ||
return []; | ||
} | ||
|
||
commands.push(`prettier --write ${files.join(' ')}`); | ||
commands.push(`prettier --write ${files.join(' ')}`); | ||
|
||
return commands; | ||
}, | ||
'*.ts': filenames => { | ||
const commands = []; | ||
const cwd = process.cwd(); | ||
const files = filenames.map(file => path.relative(cwd, file)).map(file => `'${file}'`); | ||
if (files.length === 0) { | ||
return []; | ||
} | ||
return commands; | ||
}, | ||
'*.ts': filenames => { | ||
const commands = []; | ||
const cwd = process.cwd(); | ||
const files = filenames.map(file => path.relative(cwd, file)).map(file => `'${file}'`); | ||
if (files.length === 0) { | ||
return []; | ||
} | ||
|
||
const filesForLint = filenames | ||
.map(file => path.relative(cwd, file)) | ||
.filter(file => !file.match(/^e2e\//i)) | ||
.filter(file => !file.match(/^test\//i)) | ||
.map(file => `'${file}'`); | ||
const filesForLint = filenames | ||
.map(file => path.relative(cwd, file)) | ||
.filter(file => !file.match(/^e2e\//i)) | ||
.filter(file => !file.match(/^test\//i)) | ||
.map(file => `'${file}'`); | ||
|
||
if (filesForLint.length) { | ||
commands.push(`npm run lint -- --fix --force`); | ||
} | ||
commands.push(`prettier --write ${files.join(' ')}`); | ||
if (filesForLint.length) { | ||
commands.push(`npm run lint -- --fix --force`); | ||
} | ||
commands.push(`prettier --write ${files.join(' ')}`); | ||
|
||
return commands; | ||
}, | ||
return commands; | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
printWidth: 120 | ||
tabWidth: 4 | ||
tabWidth: 2 | ||
useTabs: false | ||
semi: true | ||
singleQuote: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,40 @@ | ||
release: | ||
branches: | ||
- master | ||
branches: | ||
- master | ||
plugins: | ||
- '@semantic-release/commit-analyzer' | ||
- - '@semantic-release/exec' | ||
- prepareCmd: npm run lint && npm test && npm run e2e && npm run b:a | ||
- '@semantic-release/release-notes-generator' | ||
- - '@semantic-release/changelog' | ||
- changelogFile: CHANGELOG.md | ||
- - '@semantic-release/npm' | ||
- npmPublish: false | ||
- - '@semantic-release/npm' | ||
- pkgRoot: projects/ngrx-correlation-id | ||
npmPublish: false | ||
- - '@semantic-release/npm' | ||
- tarballDir: tmp | ||
npmPublish: false | ||
pkgRoot: dist/ngrx-correlation-id | ||
- - '@semantic-release/github' | ||
- assets: | ||
- tmp/*.tgz | ||
successComment: >- | ||
[v${nextRelease.version}](https://github.com/satanTime/ngrx-correlation-id/releases/tag/v${nextRelease.version}) | ||
has been released and contains a fix for the issue. | ||
Feel free to reopen the issue or to submit a new one if you meet any problems. | ||
failTitle: false | ||
failComment: false | ||
labels: false | ||
releasedLabels: | ||
- released | ||
- >- | ||
v${nextRelease.version} | ||
- - '@semantic-release/git' | ||
- message: 'chore(release): v${nextRelease.version}' | ||
assets: | ||
- projects/ngrx-correlation-id/package.json | ||
- CHANGELOG.md | ||
- package.json | ||
- package-lock.json | ||
- '@semantic-release/commit-analyzer' | ||
- - '@semantic-release/exec' | ||
- prepareCmd: npm run lint && npm test && npm run e2e && npm run b:a | ||
- '@semantic-release/release-notes-generator' | ||
- - '@semantic-release/changelog' | ||
- changelogFile: CHANGELOG.md | ||
- - '@semantic-release/npm' | ||
- npmPublish: false | ||
- - '@semantic-release/npm' | ||
- pkgRoot: projects/ngrx-correlation-id | ||
npmPublish: false | ||
- - '@semantic-release/npm' | ||
- tarballDir: tmp | ||
npmPublish: false | ||
pkgRoot: dist/ngrx-correlation-id | ||
- - '@semantic-release/github' | ||
- assets: | ||
- tmp/*.tgz | ||
successComment: >- | ||
[v${nextRelease.version}](https://github.com/satanTime/ngrx-correlation-id/releases/tag/v${nextRelease.version}) | ||
has been released and contains a fix for the issue. | ||
Feel free to reopen the issue or to submit a new one if you meet any problems. | ||
failTitle: false | ||
failComment: false | ||
labels: false | ||
releasedLabels: | ||
- released | ||
- >- | ||
v${nextRelease.version} | ||
- - '@semantic-release/git' | ||
- message: 'chore(release): v${nextRelease.version}' | ||
assets: | ||
- projects/ngrx-correlation-id/package.json | ||
- CHANGELOG.md | ||
- package.json | ||
- package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,45 @@ | ||
{ | ||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", | ||
"version": 1, | ||
"newProjectRoot": "projects", | ||
"projects": { | ||
"ngrx-correlation-id": { | ||
"projectType": "library", | ||
"root": "projects/ngrx-correlation-id", | ||
"sourceRoot": "projects/ngrx-correlation-id/src", | ||
"prefix": "lib", | ||
"architect": { | ||
"build": { | ||
"builder": "@angular-devkit/build-angular:ng-packagr", | ||
"options": { | ||
"tsConfig": "projects/ngrx-correlation-id/tsconfig.lib.json", | ||
"project": "projects/ngrx-correlation-id/ng-package.json" | ||
}, | ||
"configurations": { | ||
"production": { | ||
"tsConfig": "projects/ngrx-correlation-id/tsconfig.lib.prod.json" | ||
} | ||
} | ||
}, | ||
"test": { | ||
"builder": "@angular-devkit/build-angular:karma", | ||
"options": { | ||
"main": "projects/ngrx-correlation-id/src/test.ts", | ||
"tsConfig": "projects/ngrx-correlation-id/tsconfig.spec.json", | ||
"karmaConfig": "projects/ngrx-correlation-id/karma.conf.js" | ||
} | ||
}, | ||
"lint": { | ||
"builder": "@angular-devkit/build-angular:tslint", | ||
"options": { | ||
"tsConfig": [ | ||
"projects/ngrx-correlation-id/tsconfig.lib.json", | ||
"projects/ngrx-correlation-id/tsconfig.spec.json" | ||
], | ||
"exclude": ["**/node_modules/**"] | ||
} | ||
} | ||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", | ||
"version": 1, | ||
"newProjectRoot": "projects", | ||
"projects": { | ||
"ngrx-correlation-id": { | ||
"projectType": "library", | ||
"root": "projects/ngrx-correlation-id", | ||
"sourceRoot": "projects/ngrx-correlation-id/src", | ||
"prefix": "lib", | ||
"architect": { | ||
"build": { | ||
"builder": "@angular-devkit/build-angular:ng-packagr", | ||
"options": { | ||
"tsConfig": "projects/ngrx-correlation-id/tsconfig.lib.json", | ||
"project": "projects/ngrx-correlation-id/ng-package.json" | ||
}, | ||
"configurations": { | ||
"production": { | ||
"tsConfig": "projects/ngrx-correlation-id/tsconfig.lib.prod.json" | ||
} | ||
} | ||
}, | ||
"test": { | ||
"builder": "@angular-devkit/build-angular:karma", | ||
"options": { | ||
"main": "projects/ngrx-correlation-id/src/test.ts", | ||
"tsConfig": "projects/ngrx-correlation-id/tsconfig.spec.json", | ||
"karmaConfig": "projects/ngrx-correlation-id/karma.conf.js" | ||
} | ||
}, | ||
"lint": { | ||
"builder": "@angular-eslint/builder:lint", | ||
"options": { | ||
"lintFilePatterns": ["projects/ngrx-correlation-id/**/*.ts", "projects/ngrx-correlation-id/**/*.html"] | ||
} | ||
} | ||
}, | ||
"defaultProject": "ngrx-correlation-id" | ||
} | ||
} | ||
}, | ||
"defaultProject": "ngrx-correlation-id", | ||
"cli": { | ||
"defaultCollection": "@angular-eslint/schematics" | ||
} | ||
} |
Oops, something went wrong.