Skip to content

Commit

Permalink
docs: fix ng lint and tools lint command in documentation (#7387)
Browse files Browse the repository at this point in the history
* docs: fix ng lint command

* docs: fix tools lint

* docs: revert iteration of NodeeList
  • Loading branch information
tmair authored Jan 11, 2024
1 parent 6cd8113 commit 10e151e
Show file tree
Hide file tree
Showing 61 changed files with 1,068 additions and 764 deletions.
91 changes: 91 additions & 0 deletions apps/rxjs.dev/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
module.exports = {
root: true,
overrides: [
{
files: ['*.ts'],
parserOptions: {
project: ['./tsconfig.json', './tests/e2e/tsconfig.e2e.json'],
createDefaultProgram: true,
tsconfigRootDir: __dirname,
},
extends: [
'plugin:@angular-eslint/ng-cli-compat',
'plugin:@angular-eslint/ng-cli-compat--formatting-add-on',
'plugin:@angular-eslint/template/process-inline-templates',
],
rules: {
'@typescript-eslint/ban-types': 'error',
'@angular-eslint/component-selector': [
'error',
{
type: 'element',
prefix: 'aio',
style: 'kebab-case',
},
],
'@angular-eslint/directive-selector': [
'error',
{
type: 'attribute',
prefix: 'aio',
style: 'camelCase',
},
],
'dot-notation': 'error',
indent: 'off',
'max-len': ['error', 140],
'@typescript-eslint/member-delimiter-style': [
'error',
{
singleline: {
delimiter: 'comma',
requireLast: false,
},
},
],
'@typescript-eslint/member-ordering': 'off',
'@typescript-eslint/naming-convention': 'off',
'no-console': ['error', { allow: ['log', 'warn', 'error'] }],
'no-empty-function': 'off',
'@angular-eslint/no-host-metadata-property': 'off',
'no-restricted-syntax': [
'error',
{
selector: 'CallExpression[callee.name=/^(fdescribe|fit)$/]',
message: "Don't keep jasmine focus methods.",
},
],
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['error'],
'no-tabs': 'error',
'no-underscore-dangle': 'off',
'no-unused-expressions': 'off',
'@typescript-eslint/no-unused-expressions': ['error'],
'no-use-before-define': 'off',
'prefer-arrow/prefer-arrow-functions': 'off',
quotes: 'off',
'@typescript-eslint/quotes': ['error', 'single', { avoidEscape: true }],
semi: 'error',
'jsdoc/newline-after-description': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
},
},
{
files: ['*.html'],
extends: ['plugin:@angular-eslint/template/recommended'],
rules: {
'@angular-eslint/template/accessibility-alt-text': 'error',
'@angular-eslint/template/accessibility-elements-content': 'error',
'@angular-eslint/template/accessibility-label-has-associated-control': 'error',
'@angular-eslint/template/accessibility-table-scope': 'error',
'@angular-eslint/template/accessibility-valid-aria': 'error',
'@angular-eslint/template/click-events-have-key-events': 'error',
'@angular-eslint/template/eqeqeq': 'off',
'@angular-eslint/template/mouse-events-have-key-events': 'error',
'@angular-eslint/template/no-autofocus': 'error',
'@angular-eslint/template/no-distracting-elements': 'error',
'@angular-eslint/template/no-positive-tabindex': 'error',
},
},
],
};
185 changes: 0 additions & 185 deletions apps/rxjs.dev/.eslintrc.json

This file was deleted.

51 changes: 29 additions & 22 deletions apps/rxjs.dev/angular.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"$schema": "../../node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"cli": {
"packageManager": "yarn",
"analytics": false
},
"newProjectRoot": "projects",
"projects": {
"site": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "aio",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"tsConfig": "tsconfig.app.json",
"webWorkerTsConfig": "tsconfig.worker.json",
"namedChunks": true,
"polyfills": "src/polyfills.ts",
Expand All @@ -36,15 +41,21 @@
"output": "/assets/js"
}
],
"styles": [
"src/styles.scss"
],
"styles": ["src/styles.scss"],
"scripts": [],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false
"optimization": {
"fonts": true,
"scripts": true,
"styles": {
"inlineCritical": false,
"minify": true
}
},
"outputHashing": "all"
},
"configurations": {
"fast": {
Expand Down Expand Up @@ -175,11 +186,9 @@
"main": "src/test.ts",
"karmaConfig": "src/karma.conf.js",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"tsConfig": "tsconfig.spec.json",
"scripts": [],
"styles": [
"src/styles.scss"
],
"styles": ["src/styles.scss"],
"assets": [
"src/img",
"src/assets",
Expand All @@ -199,14 +208,13 @@
}
]
}
}
}
},
"site-e2e": {
"root": "e2e",
"sourceRoot": "e2e",
"projectType": "application",
"architect": {
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": ["src/!(generated)/**/*.ts", "src/!(generated)/**/*.html", "tests/**/*.ts"]
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
Expand All @@ -219,13 +227,12 @@
},
"defaultProject": "site",
"schematics": {
"@schematics/angular:application": {
"strict": true
},
"@schematics/angular:component": {
"inlineStyle": true,
"prefix": "aio",
"style": "scss"
},
"@schematics/angular:directive": {
"prefix": "aio"
}
}
}
Loading

0 comments on commit 10e151e

Please sign in to comment.