mirror of https://github.com/webpack/webpack.git
				
				
				
			optimize code-lint config
This commit is contained in:
		
							parent
							
								
									771072b0a4
								
							
						
					
					
						commit
						7ee8ca3cbf
					
				| 
						 | 
				
			
			@ -1,6 +1,17 @@
 | 
			
		|||
# Ignore node_modules
 | 
			
		||||
node_modules
 | 
			
		||||
test/**
 | 
			
		||||
 | 
			
		||||
# Ignore not support files
 | 
			
		||||
!.*.js
 | 
			
		||||
.eslintrc.js
 | 
			
		||||
*.d.ts
 | 
			
		||||
 | 
			
		||||
# Ignore some test files
 | 
			
		||||
test/**/*.js
 | 
			
		||||
!test/*.js
 | 
			
		||||
!test/*Cases/**/webpack.config.js
 | 
			
		||||
 | 
			
		||||
# Ignore some examples files
 | 
			
		||||
examples/**/*.js
 | 
			
		||||
!examples/*/webpack.config.js
 | 
			
		||||
!.*.js
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,10 +11,7 @@ module.exports = {
 | 
			
		|||
		es6: true
 | 
			
		||||
	},
 | 
			
		||||
	parserOptions: {
 | 
			
		||||
		ecmaVersion: 2017,
 | 
			
		||||
		ecmaFeatures: {
 | 
			
		||||
			experimentalObjectRestSpread: true
 | 
			
		||||
		}
 | 
			
		||||
		ecmaVersion: 2017
 | 
			
		||||
	},
 | 
			
		||||
	rules: {
 | 
			
		||||
		"prettier/prettier": "error",
 | 
			
		||||
| 
						 | 
				
			
			@ -58,7 +55,6 @@ module.exports = {
 | 
			
		|||
		jsdoc: {
 | 
			
		||||
			// supported tags https://github.com/microsoft/TypeScript-wiki/blob/master/JSDoc-support-in-JavaScript.md
 | 
			
		||||
			tagNamePreference: {
 | 
			
		||||
				// eslint-disable-next-line node/no-unsupported-features,node/no-unsupported-features/es-syntax
 | 
			
		||||
				...["implements", "const", "memberof", "readonly", "yields"].reduce(
 | 
			
		||||
					(acc, tag) => {
 | 
			
		||||
						acc[tag] = {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -67,7 +67,7 @@ yarn pretty
 | 
			
		|||
 | 
			
		||||
This performs linting on:
 | 
			
		||||
 | 
			
		||||
* eslint (eslint script)
 | 
			
		||||
* eslint (code-lint script)
 | 
			
		||||
* schema + dependencies (jest-lint script)
 | 
			
		||||
* types (type-lint script)
 | 
			
		||||
* format + generated files (special-lint script)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -71,7 +71,7 @@ jobs:
 | 
			
		|||
      - script: |
 | 
			
		||||
          set -e
 | 
			
		||||
          export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
 | 
			
		||||
          yarn -s run eslint --format junit > junit.xml
 | 
			
		||||
          yarn -s run code-lint --format junit > junit.xml
 | 
			
		||||
          yarn jest-lint
 | 
			
		||||
          yarn type-lint
 | 
			
		||||
          yarn special-lint
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -119,12 +119,12 @@
 | 
			
		|||
    "build:examples": "cd examples && node buildAll.js",
 | 
			
		||||
    "pretest": "yarn lint",
 | 
			
		||||
    "prelint": "yarn setup",
 | 
			
		||||
    "lint": "yarn eslint && yarn jest-lint && yarn type-lint && yarn special-lint",
 | 
			
		||||
    "eslint": "eslint . --ext '.js'",
 | 
			
		||||
    "lint": "yarn code-lint && yarn jest-lint && yarn type-lint && yarn special-lint",
 | 
			
		||||
    "code-lint": "eslint . --ext '.js' --cache",
 | 
			
		||||
    "type-lint": "tsc --pretty",
 | 
			
		||||
    "special-lint": "node tooling/inherit-types && node tooling/format-schemas && node tooling/compile-to-definitions",
 | 
			
		||||
    "special-lint-fix": "node tooling/inherit-types --write --override && node tooling/format-schemas --write && node tooling/compile-to-definitions --write",
 | 
			
		||||
    "fix": "yarn eslint --fix && yarn special-lint-fix",
 | 
			
		||||
    "fix": "yarn code-lint --fix && yarn special-lint-fix",
 | 
			
		||||
    "pretty": "prettier --loglevel warn --write \"*.{ts,js,json,yml,yaml}\" \"{setup,lib,bin,hot,buildin,benchmark,tooling,schemas}/**/*.{js,json}\" \"test/*.js\" \"test/{configCases,watchCases,statsCases,hotCases}/**/webpack.config.js\" \"examples/**/webpack.config.js\"",
 | 
			
		||||
    "jest-lint": "node --max-old-space-size=4096 node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.lint.js\" --no-verbose",
 | 
			
		||||
    "benchmark": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.benchmark.js\" --runInBand",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue