Skip to content

Commit 896089c

Browse files
authored
Merge pull request #7 from orchestratora/next
[Release] Major v3
2 parents 4ca725d + 02e9255 commit 896089c

34 files changed

+27616
-15541
lines changed

.eslintrc.js

+260
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,260 @@
1+
/**
2+
* We are using the .JS version of an ESLint config file here so that we can
3+
* add lots of comments to better explain and document the setup.
4+
*
5+
* Source file:
6+
* @see https://github.com/angular-eslint/angular-eslint/blob/master/packages/integration-tests/fixtures/angular-cli-workspace/.eslintrc.js
7+
*/
8+
module.exports = {
9+
root: true,
10+
parser: '@typescript-eslint/parser',
11+
parserOptions: {
12+
ecmaVersion: 2020,
13+
sourceType: 'module',
14+
project: './tsconfig.json',
15+
},
16+
ignorePatterns: [],
17+
settings: {
18+
'import/parsers': {
19+
'@typescript-eslint/parser': ['.ts', '.tsx'],
20+
},
21+
'import/resolver': {
22+
typescript: {
23+
alwaysTryTypes: true,
24+
directory: './tsconfig.json',
25+
},
26+
},
27+
},
28+
plugins: ['import', '@typescript-eslint', '@angular-eslint'],
29+
extends: [
30+
'eslint:recommended',
31+
'plugin:prettier/recommended',
32+
'plugin:@typescript-eslint/eslint-recommended',
33+
'plugin:@typescript-eslint/recommended',
34+
'prettier',
35+
'prettier/@typescript-eslint',
36+
'plugin:import/errors',
37+
'plugin:import/warnings',
38+
'plugin:import/typescript',
39+
],
40+
41+
/**
42+
* TODO: Look up what this actually includes
43+
*/
44+
// "extends": "tslint:recommended",
45+
46+
rules: {
47+
'@typescript-eslint/explicit-member-accessibility': 'off',
48+
'@typescript-eslint/explicit-function-return-type': 'off',
49+
'@typescript-eslint/no-parameter-properties': 'off',
50+
'@typescript-eslint/no-explicit-any': 'off',
51+
'@typescript-eslint/no-use-before-define': ['error', { functions: false }],
52+
// TODO: Enable deprecation rule once available
53+
// @see https://github.com/typescript-eslint/typescript-eslint/issues/1223
54+
// @see https://github.com/SonarSource/eslint-plugin-sonarjs/issues/150
55+
// '@typescript-eslint/deprecation': 'warn',
56+
'import/namespace': 0,
57+
'import/order': [
58+
'error',
59+
{
60+
groups: [
61+
['builtin', 'external'],
62+
'internal',
63+
'parent',
64+
'sibling',
65+
'index',
66+
],
67+
alphabetize: { order: 'asc' },
68+
'newlines-between': 'always',
69+
pathGroups: [{ pattern: 'ngx-testing', group: 'internal' }],
70+
},
71+
],
72+
73+
// CODELYZER Section Below
74+
75+
// ORIGINAL tslint.json -> "array-type": false,
76+
'@typescript-eslint/array-type': 'off',
77+
78+
// ORIGINAL tslint.json -> "arrow-parens": false,
79+
'arrow-parens': 'off',
80+
81+
// ORIGINAL tslint.json -> "deprecation": { "severity": "warning" },
82+
/**
83+
* | [`deprecation`] | 🌓 | [`import/no-deprecated`] <sup>[1]</sup> |
84+
* <sup>[1]</sup> Only warns when importing deprecated symbols<br>
85+
*/
86+
87+
// ORIGINAL tslint.json -> "component-class-suffix": true,
88+
'@angular-eslint/component-class-suffix': 'error',
89+
90+
// ORIGINAL tslint.json -> "contextual-lifecycle": true,
91+
'@angular-eslint/contextual-lifecycle': 'error',
92+
93+
// ORIGINAL tslint.json -> "directive-class-suffix": true,
94+
/**
95+
* TODO: Not converted yet
96+
*/
97+
// '@angular-eslint/directive-class-suffix': 'error'
98+
99+
// ORIGINAL tslint.json -> "directive-selector": [true, "attribute", "app", "camelCase"],
100+
'@angular-eslint/directive-selector': [
101+
'error',
102+
{ type: 'attribute', prefix: 'ngt', style: 'camelCase' },
103+
],
104+
105+
// ORIGINAL tslint.json -> "component-selector": [true, "element", "app", "kebab-case"],
106+
'@angular-eslint/component-selector': [
107+
'error',
108+
{ type: 'element', prefix: 'ngt', style: 'kebab-case' },
109+
],
110+
111+
// ORIGINAL tslint.json -> "import-blacklist": [true, "rxjs/Rx"],
112+
'no-restricted-imports': [
113+
'error',
114+
{
115+
paths: [
116+
{
117+
name: 'rxjs/Rx',
118+
message: "Please import directly from 'rxjs' instead",
119+
},
120+
],
121+
},
122+
],
123+
124+
// ORIGINAL tslint.json -> "interface-name": false,
125+
'@typescript-eslint/interface-name-prefix': 'off',
126+
127+
// ORIGINAL tslint.json -> "max-classes-per-file": false,
128+
'max-classes-per-file': 'off',
129+
130+
// ORIGINAL tslint.json -> "max-line-length": [true, 140],
131+
'max-len': ['error', { code: 140 }],
132+
133+
// ORIGINAL tslint.json -> "member-access": false,
134+
'@typescript-eslint/explicit-member-accessibility': 'off',
135+
136+
// ORIGINAL tslint.json -> "member-ordering": [true, { "order": ["static-field", "instance-field", "static-method", "instance-method"] } ],
137+
'@typescript-eslint/member-ordering': [
138+
'error',
139+
{
140+
default: [
141+
'static-field',
142+
'instance-field',
143+
'static-method',
144+
'instance-method',
145+
],
146+
},
147+
],
148+
149+
// ORIGINAL tslint.json -> "no-consecutive-blank-lines": false,
150+
'no-multiple-empty-lines': 'error',
151+
152+
// ORIGINAL tslint.json -> "no-console": [true, "debug", "info", "time", "timeEnd", "trace"],
153+
'no-restricted-syntax': [
154+
'error',
155+
{
156+
selector:
157+
'CallExpression[callee.object.name="console"][callee.property.name=/^(debug|info|time|timeEnd|trace)$/]',
158+
message: 'Unexpected property on console object was called',
159+
},
160+
],
161+
162+
// ORIGINAL tslint.json -> "no-empty": false,
163+
'no-empty': 'off',
164+
165+
// ORIGINAL tslint.json -> "no-inferrable-types": [true, "ignore-params"],
166+
'@typescript-eslint/no-inferrable-types': [
167+
'error',
168+
{
169+
ignoreParameters: true,
170+
},
171+
],
172+
173+
// ORIGINAL tslint.json -> "no-non-null-assertion": true,
174+
'@typescript-eslint/no-non-null-assertion': 'error',
175+
176+
// ORIGINAL tslint.json -> "no-redundant-jsdoc": true,
177+
/**
178+
* | [`no-redundant-jsdoc`] | 🛑 | N/A ([open issue](https://github.com/gajus/eslint-plugin-jsdoc/issues/134)) |
179+
*/
180+
181+
// ORIGINAL tslint.json -> "no-switch-case-fall-through": true,
182+
'no-fallthrough': 'error',
183+
184+
// ORIGINAL tslint.json -> "no-var-requires": false,
185+
'@typescript-eslint/no-var-requires': 'off',
186+
187+
// ORIGINAL tslint.json -> "object-literal-key-quotes": [true, "as-needed"],
188+
'quote-props': ['error', 'as-needed'],
189+
190+
// ORIGINAL tslint.json -> "object-literal-sort-keys": false,
191+
'sort-keys': 'off',
192+
193+
// ORIGINAL tslint.json -> "ordered-imports": false,
194+
/**
195+
* Needs import plugin
196+
*/
197+
198+
// ORIGINAL tslint.json -> "quotemark": [true, "single"],
199+
// quotes: [
200+
// 'error',
201+
// 'single',
202+
// { avoidEscape: true, allowTemplateLiterals: true },
203+
// ],
204+
205+
// ORIGINAL tslint.json -> "trailing-comma": false,
206+
'comma-dangle': 'off',
207+
208+
// ORIGINAL tslint.json -> "no-conflicting-lifecycle": true,
209+
// FIXME: Error - Definition for rule '@angular-eslint/no-conflicting-lifecycle' was not found
210+
// '@angular-eslint/no-conflicting-lifecycle': 'error',
211+
212+
// ORIGINAL tslint.json -> "no-host-metadata-property": true,
213+
'@angular-eslint/no-host-metadata-property': 'error',
214+
215+
// ORIGINAL tslint.json -> "no-input-rename": true,
216+
/**
217+
* TODO: Not converted yet
218+
*/
219+
// '@angular-eslint/no-input-rename': 'error',
220+
221+
// ORIGINAL tslint.json -> "no-inputs-metadata-property": true,
222+
'@angular-eslint/no-inputs-metadata-property': 'error',
223+
224+
// ORIGINAL tslint.json -> "no-output-native": true,
225+
'@angular-eslint/no-output-native': 'error',
226+
227+
// ORIGINAL tslint.json -> "no-output-on-prefix": true,
228+
'@angular-eslint/no-output-on-prefix': 'error',
229+
230+
// ORIGINAL tslint.json -> "no-output-rename": true,
231+
'@angular-eslint/no-output-rename': 'error',
232+
233+
// ORIGINAL tslint.json -> "no-outputs-metadata-property": true,
234+
'@angular-eslint/no-outputs-metadata-property': 'error',
235+
236+
// ORIGINAL tslint.json -> "template-banana-in-box": true,
237+
// APPLIED VIA TEMPLATE-RELATED CONFIG BELOW
238+
239+
// ORIGINAL tslint.json -> "template-no-negated-async": true,
240+
/**
241+
* TODO: Not converted yet
242+
*/
243+
244+
// ORIGINAL tslint.json -> "use-lifecycle-interface": true,
245+
'@angular-eslint/use-lifecycle-interface': 'error',
246+
247+
// ORIGINAL tslint.json -> "use-pipe-transform-interface": true
248+
'@angular-eslint/use-pipe-transform-interface': 'error',
249+
},
250+
overrides: [
251+
{
252+
files: ['*.component.html'],
253+
parser: '@angular-eslint/template-parser',
254+
plugins: ['@angular-eslint/template'],
255+
rules: {
256+
// '@angular-eslint/template/banana-in-a-box': 'error',
257+
},
258+
},
259+
],
260+
};

.prettierrc.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"$schema": "http://json.schemastore.org/prettierrc",
33
"singleQuote": true,
44
"trailingComma": "all",
5-
"bracketSpacing": true
5+
"bracketSpacing": true,
6+
"endOfLine": "lf"
67
}

.releaserc

+36-15
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,42 @@
11
{
2+
"branches": [
3+
"master",
4+
{
5+
"name": "next",
6+
"prerelease": true
7+
}
8+
],
29
"plugins": [
310
"@semantic-release/commit-analyzer",
411
"@semantic-release/release-notes-generator",
5-
["@semantic-release/changelog", {
6-
"changelogFile": "CHANGELOG.md",
7-
"changelogTitle": "# NgxTesting - Changelog"
8-
}],
9-
["@semantic-release/npm", {
10-
"pkgRoot": "dist/ngx-testing",
11-
"tarballDir": "dist"
12-
}],
13-
["@semantic-release/git", {
14-
"assets": ["CHANGELOG.md"],
15-
"message": "docs(changelog): add changes of ${nextRelease.version} [skip ci]"
16-
}],
17-
["@semantic-release/github", {
18-
"assets": "dist/*.tgz"
19-
}]
12+
[
13+
"@semantic-release/changelog",
14+
{
15+
"changelogFile": "CHANGELOG.md",
16+
"changelogTitle": "# NgxTesting - Changelog"
17+
}
18+
],
19+
[
20+
"@semantic-release/npm",
21+
{
22+
"pkgRoot": "dist/ngx-testing",
23+
"tarballDir": "dist"
24+
}
25+
],
26+
[
27+
"@semantic-release/git",
28+
{
29+
"assets": [
30+
"CHANGELOG.md"
31+
],
32+
"message": "docs(changelog): add changes of ${nextRelease.version} [skip ci]"
33+
}
34+
],
35+
[
36+
"@semantic-release/github",
37+
{
38+
"assets": "dist/*.tgz"
39+
}
40+
]
2041
]
2142
}

.travis.yml

+27-32
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,27 @@
1-
sudo: required
2-
dist: trusty
3-
language: node_js
4-
addons:
5-
chrome: stable
6-
cache:
7-
npm: true
8-
notifications:
9-
email: false
10-
node_js: lts/*
11-
branches:
12-
only:
13-
- master
14-
- /^greenkeeper/.*$/
15-
stages:
16-
- test
17-
- name: deploy
18-
if: branch = master and type != pull_request
19-
jobs:
20-
include:
21-
- stage: test
22-
script:
23-
- run-p test:ci lint build
24-
- npm run test:report
25-
- stage: release
26-
node_js: lts/*
27-
script: skip
28-
deploy:
29-
provider: script
30-
skip_cleanup: true
31-
script:
32-
- npm run semantic-release
1+
dist: trusty
2+
language: node_js
3+
addons:
4+
chrome: stable
5+
notifications:
6+
email: false
7+
node_js: lts/*
8+
stages:
9+
- test
10+
jobs:
11+
include:
12+
- stage: test
13+
script:
14+
- npm run format:check
15+
- npm run lint
16+
- npm run test:ci
17+
- npm run build:prod
18+
- npm run test:report
19+
deploy:
20+
provider: script
21+
script: npm run semantic-release
22+
skip_cleanup: true
23+
keep_history: true
24+
on:
25+
tags: false
26+
all_branches: true
27+
condition: $TRAVIS_BRANCH =~ ^(master|next)$

.vscode/settings.json

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"typescript.tsdk": "node_modules\\typescript\\lib",
33
"workbench.colorCustomizations": {
44
"activityBar.background": "#1d2f40",
5+
"activityBar.activeBorder": "#9a4671",
56
"activityBar.foreground": "#e7e7e7",
67
"activityBar.inactiveForeground": "#e7e7e799",
78
"activityBarBadge.background": "#9a4671",

0 commit comments

Comments
 (0)