99 * 1. Find the exercises at all the paths provided
1010 * 2. Check stub existence for those exercises
1111 * 3. Check integrity of configuration for those exercises
12- * 4. Check prettier package.json version and ENV matches
13- * 5. Run eslint for those exercises to check code-style
12+ * 4. Run eslint for those exercises to check code-style
1413 */
1514
1615const {
@@ -23,7 +22,6 @@ const {
2322 assignments,
2423} = require ( './helpers' ) ;
2524
26- const fn = require ( 'fn' ) ;
2725const shell = require ( 'shelljs' ) ;
2826const path = require ( 'path' ) ;
2927const files = process . argv . slice ( 2 ) ;
@@ -139,43 +137,6 @@ if (!envIsThruthy('SKIP_INTEGRITY', false)) {
139137// Cleanup tmp directory if any exists
140138cleanUp ( ) ;
141139
142- /**
143- * Check if prettier version of package.json is the same than ENV in workflow
144- */
145- const packageFile = shell . cat ( 'package.json' ) . toString ( ) ;
146- let package = JSON . parse ( packageFile ) ;
147- const packageVersion = package [ 'devDependencies' ] [ 'prettier' ] . replace ( / [ ^ 0 - 9 a - z A - Z . ] / g, '' ) ;
148- let actionFormat = ( ) => {
149- try {
150- return fs . readFileSync ( './.github/workflows/action-format.yml' , 'utf8' ) ;
151- } catch ( err ) {
152- return err ;
153- }
154-
155- }
156- let verifyCodeFormatting = ( ) => {
157- try {
158- return fs . readFileSync ( './.github/workflows/verify-code-formatting.yml' , 'utf8' ) ;
159- } catch ( err ) {
160- return err ;
161- }
162-
163- }
164-
165- let notMatchingFiles = [ ] ;
166-
167- if ( ! actionFormat ( ) . includes ( `EXERCISM_PRETTIER_VERSION: '${ packageVersion } '` ) ) {
168- notMatchingFiles . push ( 'action-format.yml' )
169- }
170- if ( ! verifyCodeFormatting ( ) . includes ( `EXERCISM_PRETTIER_VERSION: '${ packageVersion } '` ) ) {
171- notMatchingFiles . push ( 'verify-code-formatting.yml' )
172- }
173-
174- if ( notMatchingFiles . length > 0 ) {
175- throw new Error ( `Workflow EXERCISM_PRETTIER_VERSION in file(s): ${ notMatchingFiles . join ( ', ' ) } does not match pacakge.json prettier version ${ packageVersion } ` )
176- }
177-
178-
179140/**
180141 * Moves all example and test files to single directory - tmp_exercises
181142 * This allows running the test command together for all files
@@ -192,8 +153,9 @@ exercises.forEach(prepare);
192153
193154shell . env [ 'CLEANUP' ] = true ;
194155
195- const checkResult = shell . exec ( `npx babel-node ${ path . join ( 'scripts' , 'lint' ) } ` )
196- . code ;
156+ const checkResult = shell . exec (
157+ `npx babel-node ${ path . join ( 'scripts' , 'lint' ) } `
158+ ) . code ;
197159if ( checkResult !== 0 ) {
198160 shell . echo ( `scripts/lint returned a non-zero exit code: ${ checkResult } ` ) ;
199161 shell . exit ( checkResult ) ;
0 commit comments