File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 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+
210module . 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} ;
Original file line number Diff line number Diff line change 11{
22 "private" : true ,
33 "name" : " eslint-config-unicorn-tester" ,
4+ "engines" : {
5+ "node" : " >=12"
6+ },
47 "dependencies" : {
58 "eslint-plugin-unicorn" : " file:../.."
69 }
You can’t perform that action at this time.
0 commit comments