mirror of
				https://github.com/strapi/strapi.git
				synced 2025-10-31 09:56:44 +00:00 
			
		
		
		
	Fix strapi-helper-lint
This commit is contained in:
		
							parent
							
								
									0b1241300c
								
							
						
					
					
						commit
						48a2afe6bd
					
				| @ -76,7 +76,6 @@ | |||||||
|     "class-methods-use-this": 0, |     "class-methods-use-this": 0, | ||||||
|     "react/forbid-prop-types": 0, |     "react/forbid-prop-types": 0, | ||||||
|     "react/react-in-jsx-scope": 0, |     "react/react-in-jsx-scope": 0, | ||||||
|     "react/forbid-prop-types": 0, |  | ||||||
|     "react/jsx-first-prop-new-line": [ |     "react/jsx-first-prop-new-line": [ | ||||||
|       2, |       2, | ||||||
|       "multiline" |       "multiline" | ||||||
|  | |||||||
| @ -6,7 +6,7 @@ const glob = require('glob'); | |||||||
| const fs = require('fs'); | const fs = require('fs'); | ||||||
| const listChangedFiles = require('../packages/strapi-lint/lib/internals/shared/listChangedFiles.js'); | const listChangedFiles = require('../packages/strapi-lint/lib/internals/shared/listChangedFiles.js'); | ||||||
| const changedFiles = listChangedFiles(); | const changedFiles = listChangedFiles(); | ||||||
| const { take } = require('lodash'); | const { includes, take } = require('lodash'); | ||||||
| 
 | 
 | ||||||
| const frontCmd = | const frontCmd = | ||||||
|   'node ../../node_modules/strapi-lint/node_modules/.bin/eslint --ignore-path .gitignore --ignore-pattern \'/admin/build/\' --config ../../node_modules/strapi-lint/lib/internals/eslint/front/.eslintrc.json admin'; |   'node ../../node_modules/strapi-lint/node_modules/.bin/eslint --ignore-path .gitignore --ignore-pattern \'/admin/build/\' --config ../../node_modules/strapi-lint/lib/internals/eslint/front/.eslintrc.json admin'; | ||||||
| @ -19,7 +19,8 @@ const backCmd = | |||||||
| const watcher = (label, pckgName, type = 'front') => { | const watcher = (label, pckgName, type = 'front') => { | ||||||
|   shell.echo(label); |   shell.echo(label); | ||||||
|   shell.cd(pckgName); |   shell.cd(pckgName); | ||||||
|   const cmd = pckgName === 'strapi-helper-plugin' ? helperCmd : `${frontCmd} && ${backCmd}`; |   const cmd = includes(pckgName, 'strapi-helper-plugin') ? helperCmd : `${frontCmd} && ${backCmd}`; | ||||||
|  |    | ||||||
|   const data = shell.exec(cmd, { silent: true }); |   const data = shell.exec(cmd, { silent: true }); | ||||||
|   shell.echo(chalk(eslintErrorsFormatter(data.stdout))); |   shell.echo(chalk(eslintErrorsFormatter(data.stdout))); | ||||||
|   shell.cd('../..'); |   shell.cd('../..'); | ||||||
| @ -49,6 +50,7 @@ const files = glob | |||||||
|     return take(directoryArray, toTake).join('/'); |     return take(directoryArray, toTake).join('/'); | ||||||
|   }); |   }); | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
| files | files | ||||||
|   .filter((directory, index) => files.indexOf(directory) === index) |   .filter((directory, index) => files.indexOf(directory) === index) | ||||||
|   .forEach(package => { |   .forEach(package => { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 cyril lopez
						cyril lopez