@@ -12,7 +12,9 @@ const path = require('path');
1212 */
1313
1414describe ( 'eslint-config-seegno' , ( ) => {
15- const linter = new CLIEngine ( { configFile : path . join ( __dirname , '..' , 'src' , 'index.js' ) } ) ;
15+ const linter = new CLIEngine ( {
16+ configFile : path . join ( __dirname , '..' , 'src' , 'index.js' )
17+ } ) ;
1618
1719 it ( 'should not generate any violation for correct code' , ( ) => {
1820 const source = path . join ( __dirname , 'fixtures' , 'correct.js' ) ;
@@ -23,38 +25,44 @@ describe('eslint-config-seegno', () => {
2325 it ( 'should generate violations for environment-specific rules' , ( ) => {
2426 const source = path . join ( __dirname , 'fixtures' , 'environment.js' ) ;
2527
26- Array . from ( linter . executeOnFiles ( [ source ] ) . results [ 0 ] . messages . map ( violation => violation . ruleId ) ) . should . eql ( [
27- 'linebreak-style' ,
28- 'linebreak-style' ,
29- 'linebreak-style' ,
30- 'linebreak-style' ,
31- 'eol-last'
28+ Array . from (
29+ linter
30+ . executeOnFiles ( [ source ] )
31+ . results [ 0 ] . messages . map ( violation => violation . ruleId )
32+ ) . should . eql ( [
33+ 'prettier/prettier' ,
34+ 'prettier/prettier' ,
35+ 'prettier/prettier' ,
36+ 'prettier/prettier' ,
37+ 'prettier/prettier'
3238 ] ) ;
3339 } ) ;
3440
3541 it ( 'should generate violations for incorrect code' , ( ) => {
3642 const source = path . join ( __dirname , 'fixtures' , 'incorrect.js' ) ;
3743
38- Array . from ( linter . executeOnFiles ( [ source ] ) . results [ 0 ] . messages . map ( violation => violation . ruleId ) ) . should . eql ( [
39- 'array-bracket-spacing' ,
40- 'arrow-parens' ,
41- 'brace-style' ,
44+ Array . from (
45+ linter
46+ . executeOnFiles ( [ source ] )
47+ . results [ 0 ] . messages . map ( violation => violation . ruleId )
48+ ) . should . eql ( [
49+ 'prettier/prettier' ,
50+ 'prettier/prettier' ,
51+ 'prettier/prettier' ,
4252 'capitalized-comments' ,
43- 'comma-dangle' ,
44- 'comma-spacing' ,
45- 'comma-style' ,
53+ 'prettier/prettier' ,
54+ 'prettier/prettier' ,
55+ 'prettier/prettier' ,
56+ 'prettier/prettier' ,
4657 'consistent-this' ,
4758 'curly' ,
59+ 'prettier/prettier' ,
4860 'dot-notation' ,
49- 'flowtype/delimiter-dangle' ,
50- 'flowtype/delimiter-dangle' ,
51- 'generator-star-spacing' ,
52- 'generator-star-spacing' ,
53- 'generator-star-spacing' ,
54- 'generator-star-spacing' ,
55- 'generator-star-spacing' ,
61+ 'prettier/prettier' ,
62+ 'prettier/prettier' ,
63+ 'prettier/prettier' ,
5664 'id-match' ,
57- 'indent ' ,
65+ 'prettier/prettier ' ,
5866 'jest/no-disabled-tests' ,
5967 'jest/no-disabled-tests' ,
6068 'jest/no-disabled-tests' ,
@@ -66,71 +74,73 @@ describe('eslint-config-seegno', () => {
6674 'jest/no-disabled-tests' ,
6775 'jest/no-focused-tests' ,
6876 'mocha/no-exclusive-tests' ,
69- 'mocha/no-exclusive-tests' ,
7077 'jest/no-focused-tests' ,
78+ 'mocha/no-exclusive-tests' ,
7179 'jest/no-focused-tests' ,
7280 'mocha/no-exclusive-tests' ,
7381 'jest/no-focused-tests' ,
7482 'jest/no-focused-tests' ,
7583 'jest/no-identical-title' ,
76- 'key-spacing ' ,
77- 'keyword-spacing ' ,
84+ 'prettier/prettier ' ,
85+ 'prettier/prettier ' ,
7886 'no-new' ,
7987 'new-cap' ,
8088 'new-with-error/new-with-error' ,
8189 'newline-before-return' ,
90+ 'prettier/prettier' ,
8291 'no-class-assign' ,
8392 'no-console' ,
8493 'no-const-assign' ,
8594 'no-constant-condition' ,
95+ 'prettier/prettier' ,
8696 'no-dupe-class-members' ,
97+ 'prettier/prettier' ,
8798 'no-empty' ,
8899 'no-labels' ,
89100 'no-labels' ,
90- 'no-multi-spaces ' ,
101+ 'prettier/prettier ' ,
91102 'no-multi-str' ,
92- 'no-multiple-empty-lines' ,
93- 'no-spaced-func' ,
103+ 'prettier/prettier' ,
104+ 'prettier/prettier' ,
105+ 'prettier/prettier' ,
94106 'no-this-before-super' ,
107+ 'prettier/prettier' ,
95108 'no-undef' ,
109+ 'prettier/prettier' ,
96110 'no-underscore-dangle' ,
111+ 'prettier/prettier' ,
97112 'no-unused-vars' ,
98- 'object-curly-spacing' ,
99- 'object-curly-spacing' ,
113+ 'prettier/prettier' ,
100114 'one-var' ,
101- 'one-var-declaration-per-line' ,
102- 'operator-linebreak' ,
103- 'padded-blocks' ,
104- 'padded-blocks' ,
105- 'padded-blocks' ,
106- 'padded-blocks' ,
107- 'padded-blocks' ,
108- 'padded-blocks' ,
115+ 'prettier/prettier' ,
116+ 'prettier/prettier' ,
117+ 'prettier/prettier' ,
118+ 'prettier/prettier' ,
119+ 'prettier/prettier' ,
120+ 'prettier/prettier' ,
109121 'padding-line-between-statements' ,
110- 'quote-props' ,
111- 'quote-props' ,
112- 'quote-props' ,
113- 'quote-props' ,
122+ 'prettier/prettier' ,
123+ 'prettier/prettier' ,
124+ 'prettier/prettier' ,
125+ 'prettier/prettier' ,
126+ 'prettier/prettier' ,
114127 'quotes' ,
115- 'semi' ,
116- 'semi-spacing' ,
117- 'semi-spacing' ,
128+ 'prettier/prettier' ,
129+ 'prettier/prettier' ,
118130 'sort-imports-es6/sort-imports-es6' ,
119131 'sort-keys' ,
120- 'space-before-blocks' ,
121- 'space-before-function-paren' ,
122- 'space-in-parens' ,
123- 'space-in-parens' ,
124- 'space-infix-ops' ,
125- 'space-unary-ops' ,
132+ 'prettier/prettier' ,
133+ 'prettier/prettier' ,
134+ 'prettier/prettier' ,
135+ 'prettier/prettier' ,
126136 'spaced-comment' ,
127137 'sql-template/no-unsafe-query' ,
128138 'switch-case/newline-between-switch-case' ,
129139 'no-fallthrough' ,
130140 'switch-case/newline-between-switch-case' ,
131- 'template-curly-spacing ' ,
132- 'template-curly-spacing ' ,
133- 'wrap-iife ' ,
141+ 'prettier/prettier ' ,
142+ 'prettier/prettier ' ,
143+ 'prettier/prettier ' ,
134144 'sort-destructure-keys/sort-destructure-keys' ,
135145 'yoda' ,
136146 'react-hooks/exhaustive-deps' ,
@@ -142,14 +152,17 @@ describe('eslint-config-seegno', () => {
142152 'react-hooks/rules-of-hooks' ,
143153 'react-hooks/rules-of-hooks' ,
144154 'react-hooks/rules-of-hooks' ,
155+ 'prettier/prettier' ,
145156 'react/jsx-curly-brace-presence' ,
157+ 'prettier/prettier' ,
146158 'react/jsx-no-literals' ,
147- 'react/jsx-tag-spacing' ,
148- 'react/jsx-tag-spacing' ,
149- 'react/jsx-tag-spacing' ,
150- 'react/jsx-tag-spacing' ,
151- 'react/jsx-tag-spacing' ,
152- 'react/prefer-stateless-function'
159+ 'prettier/prettier' ,
160+ 'prettier/prettier' ,
161+ 'prettier/prettier' ,
162+ 'prettier/prettier' ,
163+ 'react/prefer-stateless-function' ,
164+ 'prettier/prettier' ,
165+ 'prettier/prettier'
153166 ] ) ;
154167 } ) ;
155168} ) ;
0 commit comments