Skip to content

Commit 11a1e9c

Browse files
authored
Run integration tests on disabled rules (#657)
1 parent 4ab6b8e commit 11a1e9c

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

test/integration/config.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
'use strict';
2+
const unicorn = require('eslint-plugin-unicorn');
3+
4+
const enableAllRules = Object.fromEntries(
5+
Object.entries(unicorn.configs.recommended.rules)
6+
.filter(([id, options]) => id.startsWith('unicorn/') && options === 'off')
7+
.map(([id]) => [id, 'error'])
8+
);
9+
210
module.exports = {
311
root: true,
412
parser: 'babel-eslint',
@@ -11,5 +19,11 @@ module.exports = {
1119
plugins: [
1220
'unicorn'
1321
],
14-
extends: 'plugin:unicorn/recommended'
22+
extends: 'plugin:unicorn/recommended',
23+
rules: {
24+
...enableAllRules,
25+
26+
// This rule crashing on replace string inside `jsx` or `Unicode escape sequence`
27+
'unicorn/string-content': 'off'
28+
}
1529
};

test/integration/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"private": true,
33
"name": "eslint-config-unicorn-tester",
4+
"engines": {
5+
"node": ">=12"
6+
},
47
"dependencies": {
58
"eslint-plugin-unicorn": "file:../.."
69
}

0 commit comments

Comments
 (0)