Introduce ESLint, Prettier, and NPM to the project

This commit is contained in:
jalensailin
2023-09-28 22:54:17 -04:00
parent d0b10b6a9a
commit bb32f9e2d6
8 changed files with 4706 additions and 1 deletions
+44
View File
@@ -0,0 +1,44 @@
env:
browser: true
es2021: true
extends: ["airbnb-base", "plugin:prettier/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules:
no-await-in-loop:
- warn
radix:
- error
- as-needed
default-param-last:
- warn
no-underscore-dangle: "off"
no-param-reassign:
- warn
class-methods-use-this:
- warn
no-unused-vars:
- warn
no-nested-ternary: "off"
no-restricted-syntax:
- warn
- selector: ForInStatement
message:
for..in loops iterate over the entire prototype chain, which is virtually
never what you want. Use Object.{keys,values,entries}, and iterate over the
resulting array.
- selector: LabeledStatement
message:
Labels are a form of GOTO; using them makes code confusing and hard to
maintain and understand.
- selector: WithStatement
message:
"`with` is disallowed in strict mode because it makes code impossible
to predict and optimize."
import/extensions:
- warn
- always
settings:
import/extensions:
- ".js"
+5 -1
View File
@@ -1,3 +1,4 @@
# Ignore binary compendia packs.
packs/armor
packs/armor*
packs/firearms
@@ -9,4 +10,7 @@ packs/operation-code-name-generator*
packs/operation-code-name-generator-macro
packs/operation-code-name-generator-macro*
packs/pregens
packs/pregens*
packs/pregens*
# Ignore npm modules
node_modules
+25
View File
@@ -0,0 +1,25 @@
# These are generated automatically by external packages. Let them do their thing.
**/.git
**/node_modules
**/package-lock.json
# These contain fonts, icons, and images, which are static files.
**/assets
**/documentation/images
# Ignore binary compendia packs.
packs/armor
packs/armor*
packs/firearms
packs/firearms*
packs/hand-to-hand-weapons
packs/hand-to-hand-weapons*
packs/operation-code-name-generator
packs/operation-code-name-generator*
packs/operation-code-name-generator-macro
packs/operation-code-name-generator-macro*
packs/pregens
packs/pregens*
# Ignore handlebars files as Prettier cannot handle these currently.
**/*.html
+3
View File
@@ -0,0 +1,3 @@
{
"singleQuote": false
}
+4
View File
@@ -0,0 +1,4 @@
{
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"],
"unwantedRecommendations": []
}
+4
View File
@@ -0,0 +1,4 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
}
+4594
View File
File diff suppressed because it is too large Load Diff
+27
View File
@@ -0,0 +1,27 @@
{
"name": "deltagreen",
"version": "1.3.1",
"description": "This is a fan made but now officially supported rules implementation (system) for [Foundry Virtual Tabletop](https://foundryvtt.com/) system for Delta Green: The RPG, based on the _Agent's Handbook_ rule set from Arc Dream Publishing (_**not** the Call of Cthulu rules_).",
"main": "deltagreen.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/TheLastScrub/delta-green-foundry-vtt-system-unofficial.git"
},
"author": "",
"license": "MIT",
"bugs": {
"url": "https://github.com/TheLastScrub/delta-green-foundry-vtt-system-unofficial/issues"
},
"homepage": "https://github.com/TheLastScrub/delta-green-foundry-vtt-system-unofficial#readme",
"dependencies": {
"eslint": "^8.50.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-prettier": "^5.0.0",
"eslint-config-prettier": "^9.0.0"
},
"devDependencies": {}
}