Skip to content

Commit

Permalink
Merge branch '8.0.x' into 9.x
Browse files Browse the repository at this point in the history
  • Loading branch information
macite committed Jun 18, 2024
2 parents eea5ac5 + 353a2a2 commit c583aa0
Show file tree
Hide file tree
Showing 12 changed files with 2,531 additions and 2,235 deletions.
91 changes: 0 additions & 91 deletions .eslintrc.json

This file was deleted.

6 changes: 4 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
"outputPath": "dist",
"index": "build/index.html",
"browser": "src/main.ts",
"polyfills": ["src/polyfills.ts"],
"polyfills": [
"src/polyfills.ts"
],
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/assets",
Expand Down Expand Up @@ -153,7 +155,7 @@
"options": {
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.component.html"
"src/**/*.html"
]
}
},
Expand Down
62 changes: 62 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// @ts-check

// Allows us to bring in the recommended core rules from eslint itself
const eslint = require('@eslint/js');

// Allows us to use the typed utility for our config, and to bring in the recommended rules for TypeScript projects from typescript-eslint
const tseslint = require('typescript-eslint');

// Allows us to bring in the recommended rules for Angular projects from angular-eslint
const angular = require('angular-eslint');

// Export our config array, which is composed together thanks to the typed utility function from typescript-eslint
module.exports = tseslint.config(
{
// Everything in this config object targets our TypeScript files (Components, Directives, Pipes etc)
files: ['**/*.ts'],
extends: [
// Apply the recommended core rules
eslint.configs.recommended,
// Apply the recommended TypeScript rules
...tseslint.configs.recommended,
// Optionally apply stylistic rules from typescript-eslint that improve code consistency
...tseslint.configs.stylistic,
// Apply the recommended Angular rules
...angular.configs.tsRecommended,
],
// Set the custom processor which will allow us to have our inline Component templates extracted
// and treated as if they are HTML files (and therefore have the .html config below applied to them)
processor: angular.processInlineTemplates,
// Override specific rules for TypeScript files (these will take priority over the extended configs above)
rules: {
'@angular-eslint/directive-selector': [
'error',
{
type: 'attribute',
prefix: 'f',
style: 'camelCase',
},
],
'@angular-eslint/component-selector': [
'error',
{
type: 'element',
prefix: 'f',
style: 'kebab-case',
},
],
},
},
{
// Everything in this config object targets our HTML files (external templates,
// and inline templates as long as we have the `processor` set on our TypeScript config above)
files: ['**/*component.html'],
extends: [
// Apply the recommended Angular template rules
...angular.configs.templateRecommended,
// Apply the Angular template rules which focus on accessibility of our apps
...angular.configs.templateAccessibility,
],
rules: {},
},
);
Loading

0 comments on commit c583aa0

Please sign in to comment.