Skip to content
Snippets Groups Projects
.eslintrc.json 1.8 KiB
Newer Older
Skriv's avatar
Skriv committed
	"root": true,
	"env": {
		"browser": true,
		"es6": true,
		"jquery": true
	},
	"extends": "eslint:recommended",
	"globals": {
		"SugarCube": false,
		"Config": false,
		"State": false,
		"Story": false,
		"settings": false,
		"setup": false,
		"App": false,
		"prehistory": true,
		"predisplay": true,
		"prerender": true,
		"postrender": true,
		"postdisplay": true
	},
	"parserOptions": {
		"ecmaVersion": 2018,
		"sourceType": "module",
		"ecmaFeatures": {
			"impliedStrict": true
		}
	},
	"rules": {
DCoded's avatar
DCoded committed
		"semi": ["warn", "always"],
Skriv's avatar
Skriv committed
		"semi-spacing": "warn",
Skriv's avatar
Skriv committed
		"semi-style": "warn",
Skriv's avatar
Skriv committed
		"block-spacing": ["warn", "always"],
ezsh's avatar
ezsh committed
		"curly": ["warn", "all"],
		"eqeqeq": ["warn", "smart"],
Skriv's avatar
Skriv committed
		"no-fallthrough": "error",
DCoded's avatar
DCoded committed
		"space-before-function-paren": ["warn", {
DCoded's avatar
DCoded committed
			"anonymous": "never",
DCoded's avatar
DCoded committed
			"named": "never",
			"asyncArrow": "always"
		}],
Skriv's avatar
Skriv committed
		"template-curly-spacing": ["warn", "never"],
Skriv's avatar
Skriv committed
		"no-trailing-spaces": "warn",
		"no-mixed-spaces-and-tabs": ["warn", "smart-tabs"],
DCoded's avatar
DCoded committed
		"no-unneeded-ternary": "warn",
Skriv's avatar
Skriv committed
		"camelcase": "warn",
brickode's avatar
brickode committed
		"padded-blocks": ["warn", "never"],
		"comma-spacing": "warn",
		"comma-style": "warn",
ezsh's avatar
ezsh committed
		"object-curly-newline": ["warn",
brickode's avatar
brickode committed
			{
				"ObjectExpression":{
					"minProperties": 4,
					"consistent": true
				},
				"ImportDeclaration": {
					"minProperties": 4,
					"consistent": true
				},
				"ExportDeclaration": {
					"minProperties": 4,
					"consistent": true
				},
				"ObjectPattern": {
					"minProperties": 8,
					"consistent": true
				}
brickode's avatar
brickode committed
			}
		],
brickode's avatar
brickode committed
		"object-curly-spacing": "warn",
DCoded's avatar
DCoded committed
		"no-var": "warn",
Skriv's avatar
Skriv committed
		"spaced-comment": "warn",
		"no-undef": "off",
		"no-unused-vars": ["error", {"args": "none"}],
DCoded's avatar
DCoded committed
		"block-scoped-var": "error",
		"dot-notation": "warn",
Skriv's avatar
Skriv committed
		"eol-last": "warn",
		"unicode-bom": ["error", "never"],
DCoded's avatar
DCoded committed
		"brace-style": ["warn", "1tbs",
DCoded's avatar
DCoded committed
			}
DCoded's avatar
DCoded committed
		]
Skriv's avatar
Skriv committed
	}