Adding eslint
This commit is contained in:
		
							parent
							
								
									5f8d8873b3
								
							
						
					
					
						commit
						230abf08e8
					
				
					 3 changed files with 49 additions and 0 deletions
				
			
		
							
								
								
									
										4
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -1,2 +1,6 @@
 | 
			
		|||
# ESLINT report
 | 
			
		||||
eslint_report.html
 | 
			
		||||
 | 
			
		||||
# Demo sources
 | 
			
		||||
demos/src_highres
 | 
			
		||||
demos/src_lowres
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										11
									
								
								eslint/Dockerfile
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								eslint/Dockerfile
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,11 @@
 | 
			
		|||
FROM debian:latest
 | 
			
		||||
 | 
			
		||||
RUN apt-get update && apt-get install -y --no-install-recommends npm
 | 
			
		||||
 | 
			
		||||
RUN npm install eslint --global
 | 
			
		||||
 | 
			
		||||
COPY eslintrc.json /eslintrc.json
 | 
			
		||||
 | 
			
		||||
ENTRYPOINT ["eslint", "--no-eslintrc"]
 | 
			
		||||
 | 
			
		||||
CMD ["--help"]
 | 
			
		||||
							
								
								
									
										34
									
								
								eslint/eslintrc.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								eslint/eslintrc.json
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,34 @@
 | 
			
		|||
{
 | 
			
		||||
    "env": {
 | 
			
		||||
        "browser": true,
 | 
			
		||||
	"es2021": true
 | 
			
		||||
    },
 | 
			
		||||
    "extends": [
 | 
			
		||||
        "eslint:all"
 | 
			
		||||
    ],
 | 
			
		||||
    "rules": {
 | 
			
		||||
        "semi": "warn",
 | 
			
		||||
        "spaced-comment": "warn",
 | 
			
		||||
        "padded-blocks": ["warn", "never"],
 | 
			
		||||
        "camelcase": "warn",
 | 
			
		||||
        "multiline-comment-style": "off",
 | 
			
		||||
        "max-len": "warn",
 | 
			
		||||
        "prefer-template": "warn",
 | 
			
		||||
        "object-curly-spacing" : ["warn", "always"],
 | 
			
		||||
        "func-style": ["warn", "declaration"],
 | 
			
		||||
        "key-spacing": "warn",
 | 
			
		||||
        "one-var": ["warn", "never"],
 | 
			
		||||
        "quotes": "warn",
 | 
			
		||||
        "space-before-function-paren": ["warn", "never"],
 | 
			
		||||
        "no-undefined": "off",
 | 
			
		||||
        "strict": ["error", "global"],
 | 
			
		||||
        "keyword-spacing": "warn",
 | 
			
		||||
        "function-call-argument-newline": "warn",
 | 
			
		||||
        "operator-assignment": "off",
 | 
			
		||||
        "space-before-blocks": "warn",
 | 
			
		||||
        "brace-style": ["warn", "allman", {"allowSingleLine": true}],
 | 
			
		||||
        "function-call-argument-newline" : ["warn", "consistent"],
 | 
			
		||||
        "function-paren-newline": ["warn", "consistent"],
 | 
			
		||||
        "no-magic-numbers": ["error", {"ignore": [0,1,2,100]}]
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue