Skip to content

Commit

Permalink
build: Upgrade to Angular 18 (#13)
Browse files Browse the repository at this point in the history
* ci: update action versions

* build: upgrade to Angular 18

* chore: fix lint issues

* build: temporarily downgrade angular-eslint to v17

* build: upgrade eslint to v9
  • Loading branch information
cerinoligutom authored Jun 2, 2024
1 parent 154d073 commit 5d9f136
Show file tree
Hide file tree
Showing 15 changed files with 2,110 additions and 2,008 deletions.
44 changes: 0 additions & 44 deletions .eslintrc.json

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Latest version available for each version of Angular
| >= 1.2 | 15.x | < 1.x |
| >= 2.0 | 16.x | < 1.x |
| >= 3.0 | 17.x | < 1.x |
| >= 4.0 | 18.x | < 1.x |

## Installation

Expand Down
16 changes: 9 additions & 7 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,15 @@
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"builder": "@angular-devkit/build-angular:application",
"options": {
"outputPath": "dist/ngx-fluent-example",
"outputPath": {
"base": "dist/ngx-fluent-example"
},
"index": "projects/ngx-fluent-example/src/index.html",
"main": "projects/ngx-fluent-example/src/main.ts",
"polyfills": "projects/ngx-fluent-example/src/polyfills.ts",
"polyfills": [
"projects/ngx-fluent-example/src/polyfills.ts"
],
"tsConfig": "projects/ngx-fluent-example/tsconfig.app.json",
"inlineStyleLanguage": "scss",
"assets": [
Expand All @@ -70,7 +73,8 @@
"styles": [
"projects/ngx-fluent-example/src/styles.scss"
],
"scripts": []
"scripts": [],
"browser": "projects/ngx-fluent-example/src/main.ts"
},
"configurations": {
"production": {
Expand All @@ -95,9 +99,7 @@
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
Expand Down
36 changes: 36 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// @ts-check
const eslint = require('@eslint/js');
const tseslint = require('typescript-eslint');
const angular = require('angular-eslint');

module.exports = tseslint.config(
{
files: ['**/*.ts'],
extends: [eslint.configs.recommended, ...tseslint.configs.strict, ...angular.configs.tsRecommended],
processor: angular.processInlineTemplates,
rules: {
'@typescript-eslint/no-extraneous-class': 'off',
'@angular-eslint/directive-selector': [
'error',
{
type: 'attribute',
prefix: 'app',
style: 'camelCase',
},
],
'@angular-eslint/component-selector': [
'error',
{
type: 'element',
prefix: 'app',
style: 'kebab-case',
},
],
},
},
{
files: ['**/*.html'],
extends: [...angular.configs.templateRecommended, ...angular.configs.templateAccessibility],
rules: {},
},
);
Loading

0 comments on commit 5d9f136

Please sign in to comment.