Initial commit
This commit is contained in:
commit
60b0072bcc
47 changed files with 6462 additions and 0 deletions
88
eslint.config.mjs
Normal file
88
eslint.config.mjs
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
import globals from "globals";
|
||||
import pluginJs from "@eslint/js";
|
||||
import stylistic from "@stylistic/eslint-plugin";
|
||||
|
||||
export default [
|
||||
// Tell eslint to ignore files that I don't mind being formatted slightly differently
|
||||
{ ignores: [ `scripts/` ] },
|
||||
{
|
||||
languageOptions: {
|
||||
globals: globals.browser,
|
||||
},
|
||||
},
|
||||
pluginJs.configs.recommended,
|
||||
// MARK: Foundry Globals
|
||||
{
|
||||
languageOptions: {
|
||||
globals: {
|
||||
CONFIG: `writable`,
|
||||
game: `readonly`,
|
||||
Handlebars: `readonly`,
|
||||
Hooks: `readonly`,
|
||||
ui: `readonly`,
|
||||
Actor: `readonly`,
|
||||
Actors: `readonly`,
|
||||
Item: `readonly`,
|
||||
Items: `readonly`,
|
||||
ActorSheet: `readonly`,
|
||||
ItemSheet: `readonly`,
|
||||
foundry: `readonly`,
|
||||
ChatMessage: `readonly`,
|
||||
ActiveEffect: `readonly`,
|
||||
Dialog: `readonly`,
|
||||
},
|
||||
},
|
||||
},
|
||||
// MARK: Project Specific
|
||||
{
|
||||
plugins: {
|
||||
"@stylistic": stylistic,
|
||||
},
|
||||
languageOptions: {
|
||||
globals: {
|
||||
Logger: `readonly`,
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
"curly": `error`,
|
||||
"func-names": [`warn`, `as-needed`],
|
||||
"grouped-accessor-pairs": `error`,
|
||||
"no-alert": `error`,
|
||||
"no-implied-eval": `error`,
|
||||
"no-invalid-this": `error`,
|
||||
"no-lonely-if": `error`,
|
||||
"no-unneeded-ternary": `error`,
|
||||
"no-nested-ternary": `error`,
|
||||
"no-var": `error`,
|
||||
"no-unused-vars": [
|
||||
`error`,
|
||||
{
|
||||
"vars": `local`,
|
||||
"args": `after-used`,
|
||||
"varsIgnorePattern": `^_`,
|
||||
"argsIgnorePattern": `^_`,
|
||||
},
|
||||
],
|
||||
"sort-imports": [`warn`, { "ignoreCase": true, "allowSeparatedGroups": true }],
|
||||
"@stylistic/semi": [`warn`, `always`, { "omitLastInOneLineBlock": true }],
|
||||
"@stylistic/no-trailing-spaces": `warn`,
|
||||
"@stylistic/space-before-blocks": [`warn`, `always`],
|
||||
"@stylistic/space-infix-ops": `warn`,
|
||||
"@stylistic/eol-last": `warn`,
|
||||
"@stylistic/operator-linebreak": [`warn`, `before`],
|
||||
"@stylistic/indent": [`warn`, `tab`],
|
||||
"@stylistic/brace-style": [`warn`, `1tbs`, { "allowSingleLine": true }],
|
||||
"@stylistic/quotes": [`warn`, `backtick`, { "avoidEscape": true }],
|
||||
"@stylistic/comma-dangle": [`warn`, { arrays: `always-multiline`, objects: `always-multiline`, imports: `always-multiline`, exports: `always-multiline`, functions: `always-multiline` }],
|
||||
"@stylistic/comma-style": [`warn`, `last`],
|
||||
"@stylistic/dot-location": [`error`, `property`],
|
||||
"@stylistic/no-confusing-arrow": `error`,
|
||||
"@stylistic/no-whitespace-before-property": `error`,
|
||||
"@stylistic/nonblock-statement-body-position": [
|
||||
`error`,
|
||||
`beside`,
|
||||
{ "overrides": { "while": `below` } },
|
||||
],
|
||||
},
|
||||
},
|
||||
];
|
||||
Loading…
Add table
Add a link
Reference in a new issue