Skip to content

Commit

Permalink
chore: update dev tooling (#2905)
Browse files Browse the repository at this point in the history
  • Loading branch information
yggg authored Nov 1, 2021
1 parent 595eef3 commit 7f739d4
Show file tree
Hide file tree
Showing 274 changed files with 19,870 additions and 27,159 deletions.
17 changes: 17 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support

# You can see what browsers were selected by your queries by running:
# npx browserslist

last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
IE 11
90 changes: 90 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"root": true,
"ignorePatterns": [
"src/framework/**/*",
"docs/**/*",
"packages-smoke/**/*",
"tools/dev-schematics/*/files"
],
"overrides": [
{
"files": [
"*.ts"
],
"parserOptions": {
"project": [
"tsconfig.json",
"e2e/tsconfig.json"
],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates",
"eslint-config-prettier"
],
"plugins": [
"eslint-plugin-rxjs"
],
"rules": {
"quotes": "off",
"dot-notation": "off",
"no-restricted-globals": ["error", "fit", "fdescribe"],
"@typescript-eslint/dot-notation": "error",
"no-shadow": "off",
"@typescript-eslint/no-shadow": "error",
"no-underscore-dangle": "off",
"@typescript-eslint/consistent-type-definitions": "error",
"rxjs/no-unsafe-takeuntil": [
"error",
{
"allow": [
"count",
"defaultIfEmpty",
"endWith",
"every",
"finalize",
"finally",
"isEmpty",
"last",
"max",
"min",
"publish",
"publishBehavior",
"publishLast",
"publishReplay",
"reduce",
"share",
"shareReplay",
"skipLast",
"takeLast",
"throwIfEmpty",
"toArray"
]
}
]
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended",
"eslint-config-prettier"
],
"rules": {}
},
{
"files": [
"./*.js"
],
"parserOptions": {
"ecmaVersion": 11
},
"env": {
"node": true
}
}
]
}
5 changes: 0 additions & 5 deletions .firebaserc

This file was deleted.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ testem.log
/docs/assets/examples
/docs/dist
/packages-smoke/dist
.eslintcache

# e2e
/e2e/*.js
Expand All @@ -49,4 +50,4 @@ Thumbs.db
debug.log
local.log

/schematics/dist
/tools/dev-schematics/dist
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
5 changes: 5 additions & 0 deletions .lintstagedrc-fix.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"*.{ts,js}": "eslint --cache --fix",
"*.{scss,css}": "stylelint --fix",
"*.{ts,scss,html,md,js,css}": "prettier --write"
}
5 changes: 5 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"*.{ts,js}": "eslint --cache",
"*.{scss,css}": "stylelint",
"*.{ts,scss,html,md,js,css}": "prettier --check"
}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14.17.6
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ignore artifacts:
build
coverage
dist
tools/dev-schematics/*/files
5 changes: 5 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"printWidth": 120,
"singleQuote": true,
"trailingComma": "all"
}
94 changes: 39 additions & 55 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -1,74 +1,58 @@
{
"extends": [
"stylelint-config-prettier"
],
"rules": {
"color-hex-case": "lower",
"color-no-invalid-hex": true,

"function-calc-no-unspaced-operator": true,
"function-comma-space-after": "always-single-line",
"function-comma-space-before": "never",
"function-name-case": "lower",
"function-url-quotes": "always",
"function-whitespace-after": "always",

"number-leading-zero": "always",
"number-no-trailing-zeros": true,
"length-zero-no-unit": true,

"string-no-newline": true,
"string-quotes": "single",

"unit-case": "lower",
"unit-no-unknown": true,
"unit-whitelist": ["px", "%", "deg", "ms", "em", "vh", "vw", "vmax", "s", "rem"],

"value-list-comma-space-after": "always-single-line",
"value-list-comma-space-before": "never",

"unit-allowed-list": [
"px",
"%",
"deg",
"ms",
"em",
"vh",
"vw",
"vmax",
"s",
"rem"
],
"shorthand-property-no-redundant-values": true,

"property-case": "lower",

"declaration-block-no-duplicate-properties": [ true, {
"ignore": ["consecutive-duplicates-with-different-values"]
}],
"declaration-block-trailing-semicolon": "always",
"declaration-block-single-line-max-declarations": 1,
"declaration-block-semicolon-space-before": "never",
"declaration-block-semicolon-space-after": "always-single-line",
"declaration-block-semicolon-newline-before": "never-multi-line",
"declaration-block-semicolon-newline-after": "always-multi-line",
"declaration-property-value-blacklist": [
{ "/.*/": ["initial"] },
{ "message": "The `initial` value is not supported in IE."}
"declaration-block-no-duplicate-properties": [
true,
{
"ignore": [
"consecutive-duplicates-with-different-values"
]
}
],

"block-closing-brace-newline-after": [
"always",
"declaration-block-single-line-max-declarations": 1,
"declaration-property-value-disallowed-list": [
{
"ignoreAtRules": ["if", "else"]
"/.*/": [
"initial"
]
},
{
"message": "The `initial` value is not supported in IE."
}
],
"block-closing-brace-newline-before": "always-multi-line",
"block-opening-brace-newline-after": "always-multi-line",
"block-opening-brace-space-before": "always-multi-line",

"selector-attribute-brackets-space-inside": "never",
"selector-attribute-operator-space-after": "never",
"selector-attribute-operator-space-before": "never",
"selector-combinator-space-after": "always",
"selector-combinator-space-before": "always",
"selector-pseudo-class-case": "lower",
"selector-pseudo-class-parentheses-space-inside": "never",
"selector-pseudo-element-case": "lower",
"selector-pseudo-element-colon-notation": "double",
"selector-pseudo-element-no-unknown": [true, {
"ignorePseudoElements": ["ng-deep"]
}],
"selector-pseudo-element-no-unknown": [
true,
{
"ignorePseudoElements": [
"ng-deep"
]
}
],
"selector-type-case": "lower",
"selector-max-id": 0,

"no-missing-end-of-source-newline": true,

"max-line-length": 120
"selector-max-id": 0
}
}
5 changes: 0 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,13 @@ env:
- MODE=build
- MODE=docs
- MODE=lint
- MODE=deploy_dev
- MODE=publish_dev
branches:
only:
- master
- next

matrix:
fast_finish: true
allow_failures:
- env: MODE=deploy_dev
- env: MODE=publish_dev

install:
- npm install
Expand Down
Loading

0 comments on commit 7f739d4

Please sign in to comment.