mirror of
				https://github.com/strapi/strapi.git
				synced 2025-10-31 01:47:13 +00:00 
			
		
		
		
	Fix strapi-helper-lint
This commit is contained in:
		
							parent
							
								
									0b1241300c
								
							
						
					
					
						commit
						48a2afe6bd
					
				| @ -76,7 +76,6 @@ | ||||
|     "class-methods-use-this": 0, | ||||
|     "react/forbid-prop-types": 0, | ||||
|     "react/react-in-jsx-scope": 0, | ||||
|     "react/forbid-prop-types": 0, | ||||
|     "react/jsx-first-prop-new-line": [ | ||||
|       2, | ||||
|       "multiline" | ||||
|  | ||||
| @ -6,7 +6,7 @@ const glob = require('glob'); | ||||
| const fs = require('fs'); | ||||
| const listChangedFiles = require('../packages/strapi-lint/lib/internals/shared/listChangedFiles.js'); | ||||
| const changedFiles = listChangedFiles(); | ||||
| const { take } = require('lodash'); | ||||
| const { includes, take } = require('lodash'); | ||||
| 
 | ||||
| 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'; | ||||
| @ -19,7 +19,8 @@ const backCmd = | ||||
| const watcher = (label, pckgName, type = 'front') => { | ||||
|   shell.echo(label); | ||||
|   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 }); | ||||
|   shell.echo(chalk(eslintErrorsFormatter(data.stdout))); | ||||
|   shell.cd('../..'); | ||||
| @ -49,6 +50,7 @@ const files = glob | ||||
|     return take(directoryArray, toTake).join('/'); | ||||
|   }); | ||||
| 
 | ||||
| 
 | ||||
| files | ||||
|   .filter((directory, index) => files.indexOf(directory) === index) | ||||
|   .forEach(package => { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 cyril lopez
						cyril lopez