Added code formatting standard via eslint

This commit is contained in:
Dan Brown 2023-04-18 22:19:27 +01:00
parent 69d03042c6
commit 752ee664c2
No known key found for this signature in database
GPG key ID: 46D9F943C24A2EF9
2 changed files with 1343 additions and 1 deletions

1309
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -12,12 +12,17 @@
"dev": "npm-run-all --parallel watch livereload", "dev": "npm-run-all --parallel watch livereload",
"watch": "npm-run-all --parallel build:*:watch", "watch": "npm-run-all --parallel build:*:watch",
"livereload": "livereload ./public/dist/", "livereload": "livereload ./public/dist/",
"permissions": "chown -R $USER:$USER bootstrap/cache storage public/uploads" "permissions": "chown -R $USER:$USER bootstrap/cache storage public/uploads",
"lint": "eslint \"resources/**/*.js\" \"resources/**/*.mjs\"",
"fix": "eslint --fix \"resources/**/*.js\" \"resources/**/*.mjs\""
}, },
"devDependencies": { "devDependencies": {
"@lezer/generator": "^1.2.2", "@lezer/generator": "^1.2.2",
"chokidar-cli": "^3.0", "chokidar-cli": "^3.0",
"esbuild": "^0.17.16", "esbuild": "^0.17.16",
"eslint": "^8.38.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.27.5",
"livereload": "^0.9.3", "livereload": "^0.9.3",
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"punycode": "^2.3.0", "punycode": "^2.3.0",
@ -45,5 +50,33 @@
"markdown-it-task-lists": "^2.1.1", "markdown-it-task-lists": "^2.1.1",
"snabbdom": "^3.5.1", "snabbdom": "^3.5.1",
"sortablejs": "^1.15.0" "sortablejs": "^1.15.0"
},
"eslintConfig": {
"root": true,
"env": {
"browser": true,
"es2021": true
},
"extends": "airbnb-base",
"overrides": [
],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
"indent": ["error", 4],
"arrow-parens": ["error", "as-needed"],
"padded-blocks": ["error", {
"blocks": "never",
"classes": "always"
}],
"object-curly-spacing": ["error", "never"],
"space-before-function-paren": ["error", {
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}]
}
} }
} }