Skip to content

Commit e286aae

Browse files
committed
feat(config): update 9.x config and rename to recommended
This change updates the rules and prepares for other variations of the config BREAKING CHANGE: Projects using the 9.x plugin will need to change to the recommended plugin
1 parent 511b6d5 commit e286aae

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@
77

88
An ESLint plugin to match the [Drupal standard](https://www.drupal.org/node/1955232) for contrib modules and themes.
99

10-
Extends [eslint-config-airbnb](https://github.com/airbnb/javascript) and [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier)
10+
Extends [eslint-config-airbnb](https://github.com/airbnb/javascript) and [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier).
1111

1212
For more detail on the rules implemented, see the config itself:
1313

14-
- [9.x](./src/9.x.js)
14+
- [recommended](./src/recommended.js)
1515

1616
## Installation
1717

1818
```shell
1919
# latest stable
20-
npm install eslint prettier --save-dev
21-
npm install eslint-plugin-drupal-contrib --save-dev
20+
npm install eslint@8 prettier@3 --save-dev
21+
npm install eslint-plugin-drupal-contrib@2 --save-dev
2222
```
2323

2424
## Usage
@@ -28,7 +28,7 @@ npm install eslint-plugin-drupal-contrib --save-dev
2828
Add the following to your eslint configuration file
2929

3030
```jsx
31-
extends: ["plugin:drupal-contrib/9.x"]
31+
extends: ["plugin:drupal-contrib/recommended"]
3232
```
3333

3434
## Versioning

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const core9x = require("./src/9.x");
1+
import recommended from "./src/recommended";
22

33
module.exports = {
44
configs: {
5-
"9.x": core9x,
5+
recommended,
66
},
77
};

src/9.x.js renamed to src/recommended.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
module.exports = {
2-
extends: ["airbnb", "plugin:prettier/recommended", "plugin:yml/recommended"],
1+
export default {
2+
extends: [
3+
"airbnb-base",
4+
"plugin:prettier/recommended",
5+
"plugin:yml/recommended",
6+
],
37
root: true,
48
env: {
59
browser: true,
@@ -24,11 +28,6 @@ module.exports = {
2428
CKEditor5: true,
2529
tabbable: true,
2630
},
27-
settings: {
28-
react: {
29-
version: "detect",
30-
},
31-
},
3231
rules: {
3332
"prettier/prettier": "error",
3433
"consistent-return": ["off"],
@@ -59,5 +58,6 @@ module.exports = {
5958
"after",
6059
{ overrides: { "?": "ignore", ":": "ignore" } },
6160
],
61+
"yml/indent": ["error", 2],
6262
},
6363
};

0 commit comments

Comments
 (0)