mirror of https://github.com/grafana/grafana.git
				
				
				
			Chore: Remove prettier-plugin from ESLint (#45910)
* chore(eslint): remove prettier-plugin * chore(eslint): test changes by using grafana/eslint 3.0.0-alpha * chore(prettier): add js,ts,tsx when checking / writing * chore(prettier): dont check js files * chore(linting): align prettier and eslint ignore files * style: run prettier:write on FE codebase * chore(eslint): use grafana/eslint-config@3.0.0
This commit is contained in:
		
							parent
							
								
									a9b1a964b0
								
							
						
					
					
						commit
						9b5a42845d
					
				|  | @ -1,5 +1,5 @@ | |||
| import { regexp } from '@betterer/regexp'; | ||||
| 
 | ||||
| export default { | ||||
|   'no enzyme tests': () => regexp(/from 'enzyme'/g).include('**/*.test.*') | ||||
|   'no enzyme tests': () => regexp(/from 'enzyme'/g).include('**/*.test.*'), | ||||
| }; | ||||
|  |  | |||
|  | @ -1,14 +1,18 @@ | |||
| node_modules | ||||
| compiled | ||||
| .git | ||||
| .github | ||||
| .yarn | ||||
| build | ||||
| vendor | ||||
| devenv | ||||
| compiled | ||||
| data | ||||
| deployment_tools_config.json | ||||
| devenv | ||||
| dist | ||||
| e2e/tmp | ||||
| scripts/grafana-server/tmp | ||||
| node_modules | ||||
| pkg | ||||
| public/lib/monaco | ||||
| deployment_tools_config.json | ||||
| scripts/grafana-server/tmp | ||||
| vendor | ||||
| 
 | ||||
| # TS generate from cue by cuetsy | ||||
| **/*.gen.ts | ||||
|  |  | |||
|  | @ -1,14 +1,23 @@ | |||
| .git | ||||
| .github | ||||
| dist/ | ||||
| pkg/ | ||||
| node_modules | ||||
| public/vendor/ | ||||
| vendor/ | ||||
| /data/ | ||||
| .yarn | ||||
| build | ||||
| compiled | ||||
| data | ||||
| deployment_tools_config.json | ||||
| devenv | ||||
| dist | ||||
| e2e/tmp | ||||
| scripts/grafana-server/tmp | ||||
| public/build/ | ||||
| public/sass/*.generated.scss | ||||
| devenv/ | ||||
| node_modules | ||||
| pkg | ||||
| public/lib/monaco | ||||
| public/sass/*.generated.scss | ||||
| scripts/grafana-server/tmp | ||||
| vendor | ||||
| 
 | ||||
| # TS generate from cue by cuetsy | ||||
| **/*.gen.ts | ||||
| 
 | ||||
| # Auto-generated localisation files | ||||
| public/locales/_build/ | ||||
| public/locales/**/*.js | ||||
|  |  | |||
							
								
								
									
										10
									
								
								package.json
								
								
								
								
							
							
						
						
									
										10
									
								
								package.json
								
								
								
								
							|  | @ -35,8 +35,8 @@ | |||
|     "packages:typecheck": "lerna run typecheck", | ||||
|     "packages:clean": "lerna run clean", | ||||
|     "precommit": "yarn run lint-staged", | ||||
|     "prettier:check": "prettier --check --list-different=false --loglevel=warn \"**/*.{scss,md,mdx}\"", | ||||
|     "prettier:write": "prettier --list-different \"**/*.{scss,md,mdx}\" --write", | ||||
|     "prettier:check": "prettier --check --list-different=false --loglevel=warn \"**/*.{ts,tsx,scss,md,mdx}\"", | ||||
|     "prettier:write": "prettier --list-different \"**/*.{js,ts,tsx,scss,md,mdx}\" --write", | ||||
|     "start": "yarn themes:generate && yarn dev --watch", | ||||
|     "start:noTsCheck": "yarn start --env noTsCheck=1", | ||||
|     "start:hot": "yarn themes:generate && NODE_ENV=hot yarn dev --config scripts/webpack/webpack.hot.js", | ||||
|  | @ -60,7 +60,8 @@ | |||
|   "lint-staged": { | ||||
|     "*.{js,ts,tsx}": [ | ||||
|       "betterer precommit", | ||||
|       "eslint --ext .js,.tsx,.ts --cache --fix" | ||||
|       "eslint --ext .js,.tsx,.ts --cache --fix", | ||||
|       "prettier --write" | ||||
|     ], | ||||
|     "*.{json,scss,md,mdx}": [ | ||||
|       "prettier --write" | ||||
|  | @ -87,7 +88,7 @@ | |||
|     "@emotion/eslint-plugin": "11.7.0", | ||||
|     "@grafana/api-documenter": "7.11.2", | ||||
|     "@grafana/e2e": "workspace:*", | ||||
|     "@grafana/eslint-config": "2.5.2", | ||||
|     "@grafana/eslint-config": "3.0.0", | ||||
|     "@grafana/toolkit": "workspace:*", | ||||
|     "@grafana/tsconfig": "^1.2.0-rc1", | ||||
|     "@lingui/cli": "3.13.2", | ||||
|  | @ -175,7 +176,6 @@ | |||
|     "eslint-plugin-jest": "^26.1.0", | ||||
|     "eslint-plugin-jsdoc": "37.9.1", | ||||
|     "eslint-plugin-lodash": "7.4.0", | ||||
|     "eslint-plugin-prettier": "4.0.0", | ||||
|     "eslint-plugin-react": "7.29.2", | ||||
|     "eslint-plugin-react-hooks": "4.3.0", | ||||
|     "eslint-webpack-plugin": "3.1.1", | ||||
|  |  | |||
|  | @ -6,9 +6,4 @@ import { lastPointTracker } from './lastPointTracker'; | |||
| /** | ||||
|  * Registry for layer handlers | ||||
|  */ | ||||
| export const dataLayers = [ | ||||
|   markersLayer, | ||||
|   heatmapLayer, | ||||
|   lastPointTracker, | ||||
|   geojsonLayer, | ||||
| ]; | ||||
| export const dataLayers = [markersLayer, heatmapLayer, lastPointTracker, geojsonLayer]; | ||||
|  |  | |||
|  | @ -83,9 +83,9 @@ export const markersLayer: MapLayerRegistryItem<MarkersConfig> = { | |||
|       vectorLayer.setStyle(style.maker(style.base)); | ||||
|     } else { | ||||
|       vectorLayer.setStyle((feature: FeatureLike) => { | ||||
|         const idx = feature.get("rowIndex") as number; | ||||
|         const idx = feature.get('rowIndex') as number; | ||||
|         const dims = style.dims; | ||||
|         if(!dims || !(isNumber(idx))) { | ||||
|         if (!dims || !isNumber(idx)) { | ||||
|           return style.maker(style.base); | ||||
|         } | ||||
| 
 | ||||
|  | @ -103,7 +103,7 @@ export const markersLayer: MapLayerRegistryItem<MarkersConfig> = { | |||
|         if (dims.rotation) { | ||||
|           values.rotation = dims.rotation.get(idx); | ||||
|         } | ||||
|         return style.maker(values) | ||||
|         return style.maker(values); | ||||
|       }); | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										19
									
								
								yarn.lock
								
								
								
								
							
							
						
						
									
										19
									
								
								yarn.lock
								
								
								
								
							|  | @ -4141,6 +4141,22 @@ __metadata: | |||
|   languageName: node | ||||
|   linkType: hard | ||||
| 
 | ||||
| "@grafana/eslint-config@npm:3.0.0": | ||||
|   version: 3.0.0 | ||||
|   resolution: "@grafana/eslint-config@npm:3.0.0" | ||||
|   dependencies: | ||||
|     "@typescript-eslint/eslint-plugin": 5.10.0 | ||||
|     "@typescript-eslint/parser": 5.10.0 | ||||
|     eslint: 7.28.0 | ||||
|     eslint-config-prettier: 8.3.0 | ||||
|     eslint-plugin-jsdoc: 37.7.0 | ||||
|     eslint-plugin-react: 7.28.0 | ||||
|     eslint-plugin-react-hooks: 4.3.0 | ||||
|     typescript: 4.4.4 | ||||
|   checksum: 27320a7ff7241bba132cccb62cd5d229300b0e9867d3e214ad8606c6d10a2015845bbf9d008d708f7e4f884d004c4c4c8db5694b3f2e006dcc6c5b411a3d350e | ||||
|   languageName: node | ||||
|   linkType: hard | ||||
| 
 | ||||
| "@grafana/experimental@npm:0.0.2-canary.18": | ||||
|   version: 0.0.2-canary.18 | ||||
|   resolution: "@grafana/experimental@npm:0.0.2-canary.18" | ||||
|  | @ -20701,7 +20717,7 @@ __metadata: | |||
|     "@grafana/data": "workspace:*" | ||||
|     "@grafana/e2e": "workspace:*" | ||||
|     "@grafana/e2e-selectors": "workspace:*" | ||||
|     "@grafana/eslint-config": 2.5.2 | ||||
|     "@grafana/eslint-config": 3.0.0 | ||||
|     "@grafana/experimental": 0.0.2-canary.18 | ||||
|     "@grafana/google-sdk": 0.0.2 | ||||
|     "@grafana/runtime": "workspace:*" | ||||
|  | @ -20846,7 +20862,6 @@ __metadata: | |||
|     eslint-plugin-jest: ^26.1.0 | ||||
|     eslint-plugin-jsdoc: 37.9.1 | ||||
|     eslint-plugin-lodash: 7.4.0 | ||||
|     eslint-plugin-prettier: 4.0.0 | ||||
|     eslint-plugin-react: 7.29.2 | ||||
|     eslint-plugin-react-hooks: 4.3.0 | ||||
|     eslint-webpack-plugin: 3.1.1 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue