Skip to content

Commit

Permalink
Merge pull request #579 from satanTime/issues/eslint
Browse files Browse the repository at this point in the history
build(eslint): switching from tslint to eslint
  • Loading branch information
satanTime authored Jun 2, 2021
2 parents 5c077f8 + 3a4dfeb commit fe2d58d
Show file tree
Hide file tree
Showing 193 changed files with 6,793 additions and 6,306 deletions.
596 changes: 298 additions & 298 deletions .circleci/config.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .commitlintrc.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
extends:
- '@commitlint/config-conventional'
- '@commitlint/config-conventional'
22 changes: 11 additions & 11 deletions .editorconfig
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
37 changes: 37 additions & 0 deletions .eslintrc.json
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": {}
}
]
}
62 changes: 31 additions & 31 deletions .lintstagedrc.js
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;
},
};
2 changes: 1 addition & 1 deletion .prettierrc.yaml
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
Expand Down
76 changes: 38 additions & 38 deletions .releaserc.yaml
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
22 changes: 11 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,40 @@

### Bug Fixes

- a6 a7 type failure ([b8d81f1](https://github.com/satanTime/ngrx-correlation-id/commit/b8d81f1ba04dcdef090a4a12c5b320525dbc3cd8))
- a6 a7 type failure ([b8d81f1](https://github.com/satanTime/ngrx-correlation-id/commit/b8d81f1ba04dcdef090a4a12c5b320525dbc3cd8))

### Features

- a10 ([0dc17af](https://github.com/satanTime/ngrx-correlation-id/commit/0dc17afbe60d11cdd393fee96e4e508c84344955))
- a11 ([bcabe22](https://github.com/satanTime/ngrx-correlation-id/commit/bcabe2265edaa16ba10ad77c75fa82d1dbeefd19))
- a7 ([c8e6aff](https://github.com/satanTime/ngrx-correlation-id/commit/c8e6affb4e874ef26c345d5745e08a88e6f4a5db))
- a8 ([6077e50](https://github.com/satanTime/ngrx-correlation-id/commit/6077e508aebac64f00335ef31b25a74fd97c9e49))
- a9 ([c7957a0](https://github.com/satanTime/ngrx-correlation-id/commit/c7957a0f98c1993a172b4c184646483d3369c5f2))
- a10 ([0dc17af](https://github.com/satanTime/ngrx-correlation-id/commit/0dc17afbe60d11cdd393fee96e4e508c84344955))
- a11 ([bcabe22](https://github.com/satanTime/ngrx-correlation-id/commit/bcabe2265edaa16ba10ad77c75fa82d1dbeefd19))
- a7 ([c8e6aff](https://github.com/satanTime/ngrx-correlation-id/commit/c8e6affb4e874ef26c345d5745e08a88e6f4a5db))
- a8 ([6077e50](https://github.com/satanTime/ngrx-correlation-id/commit/6077e508aebac64f00335ef31b25a74fd97c9e49))
- a9 ([c7957a0](https://github.com/satanTime/ngrx-correlation-id/commit/c7957a0f98c1993a172b4c184646483d3369c5f2))

## [1.0.3](https://github.com/satanTime/ngrx-correlation-id/compare/v1.0.2...v1.0.3) (2020-11-14)

### Bug Fixes

- adding Angular 11 coverage ([7ab3b3d](https://github.com/satanTime/ngrx-correlation-id/commit/7ab3b3d1a37d051ddad55ffc1f0e724a750413ef))
- adding Angular 11 coverage ([7ab3b3d](https://github.com/satanTime/ngrx-correlation-id/commit/7ab3b3d1a37d051ddad55ffc1f0e724a750413ef))

## [1.0.2](https://github.com/satanTime/ngrx-correlation-id/compare/v1.0.1...v1.0.2) (2020-09-12)

### Bug Fixes

- using stable ngrx ([0fa3df0](https://github.com/satanTime/ngrx-correlation-id/commit/0fa3df03d4e1cd2856ad625e8cb69984d449248d))
- using stable ngrx ([0fa3df0](https://github.com/satanTime/ngrx-correlation-id/commit/0fa3df03d4e1cd2856ad625e8cb69984d449248d))

## [1.0.1](https://github.com/satanTime/ngrx-correlation-id/compare/v1.0.0...v1.0.1) (2020-05-31)

### Bug Fixes

- readme and license in builds ([399cf9a](https://github.com/satanTime/ngrx-correlation-id/commit/399cf9a8423c765a7feafb63f1300be9497c0f4d))
- readme and license in builds ([399cf9a](https://github.com/satanTime/ngrx-correlation-id/commit/399cf9a8423c765a7feafb63f1300be9497c0f4d))

# 1.0.0 (2020-05-31)

### Bug Fixes

- support of ci ([03a300e](https://github.com/satanTime/ngrx-correlation-id/commit/03a300e006b379455e3e98b1f7062ef7ecb8df00))
- support of ci ([03a300e](https://github.com/satanTime/ngrx-correlation-id/commit/03a300e006b379455e3e98b1f7062ef7ecb8df00))

### Features

- ngrx-correlation-id ([d0102bf](https://github.com/satanTime/ngrx-correlation-id/commit/d0102bff07796c5a2ba3be4f4f248a97991857c6))
- ngrx-correlation-id ([d0102bf](https://github.com/satanTime/ngrx-correlation-id/commit/d0102bff07796c5a2ba3be4f4f248a97991857c6))
26 changes: 13 additions & 13 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Expand Down
83 changes: 41 additions & 42 deletions angular.json
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"
}
}
Loading

0 comments on commit fe2d58d

Please sign in to comment.