Skip to content

Commit 20a6e59

Browse files
committed
Support ESLint v9
1 parent 77707ee commit 20a6e59

29 files changed

+668
-653
lines changed

.eslintrc.yaml

Lines changed: 0 additions & 261 deletions
This file was deleted.

README.md

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,19 @@ Since the 0.0.4 release, some rules defined in [John Papa's Guideline](https://g
4141
npm install --save-dev eslint-plugin-angular
4242
```
4343

44-
3. Use the shareable config by adding it to your `.eslintrc`:
45-
46-
```yaml
47-
extends: plugin:angular/johnpapa
44+
3. Use the shareable config by adding it to your `eslintrc.config.mjs`:
45+
46+
```js
47+
import angular from "eslint-plugin-angular";
48+
49+
export default defineConfig([{
50+
plugins: {
51+
angular
52+
},
53+
rules: {
54+
...angular.configs.johnpapa.rules
55+
}
56+
}]);
4857
```
4958

5059

@@ -63,19 +72,30 @@ Since the 0.0.4 release, some rules defined in [John Papa's Guideline](https://g
6372
npm install --save-dev eslint-plugin-angular
6473
```
6574

66-
3. Enable the plugin by adding it to your `.eslintrc`:
75+
3. Enable the plugin by adding it to your `eslint.config.mjs`:
6776

68-
```yaml
69-
plugins:
70-
- angular
71-
```
72-
4. You can also configure these rules in your `.eslintrc`. All rules defined in this plugin have to be prefixed by 'angular/'
77+
```js
78+
import angular from "eslint-plugin-angular";
7379
74-
```yaml
75-
plugins:
76-
- angular
77-
rules:
78-
- angular/controller_name: 0
80+
export default defineConfig([{
81+
plugins: {
82+
angular
83+
}
84+
}]);
85+
```
86+
4. You can also configure these rules in your `eslint.config.mjs`. All rules defined in this plugin have to be prefixed by 'angular/'
87+
88+
```js
89+
import angular from "eslint-plugin-angular";
90+
91+
export default defineConfig([{
92+
plugins: {
93+
angular
94+
},
95+
rules: {
96+
"angular/controller-name": "error"
97+
}
98+
}]);
7999
```
80100

81101
----

0 commit comments

Comments
 (0)