-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add prettier, update eslint with real rules
- Loading branch information
1 parent
f187cfc
commit da97faa
Showing
5 changed files
with
65 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,35 @@ | ||
// eslint.config.js | ||
module.exports = [ | ||
{ | ||
rules: { | ||
semi: "error", | ||
"prefer-const": "error" | ||
} | ||
} | ||
// borrowed from fauna-shell | ||
export default [ | ||
{ | ||
ignores: ["**/node_modules", ".history"], | ||
}, | ||
{ | ||
languageOptions: { | ||
ecmaVersion: 2020, | ||
}, | ||
|
||
rules: { | ||
"no-await-in-loop": "off", | ||
"new-cap": "off", | ||
"quote-props": "off", | ||
"no-negated-condition": "off", | ||
"no-warning-comments": "off", | ||
"spaced-comment": "off", | ||
"max-nested-callbacks": "off", | ||
"no-else-return": "off", | ||
"no-console": "off", | ||
"no-multi-str": "off", | ||
"no-prototype-builtins": "off", | ||
|
||
"node/no-unsupported-features": "off", | ||
camelcase: "off", | ||
}, | ||
}, | ||
{ | ||
files: ["test/**/*.mjs"], | ||
|
||
rules: { | ||
"no-unused-expressions": "off", | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* @see https://prettier.io/docs/en/configuration.html | ||
* @type {import("prettier").Config} | ||
*/ | ||
const config = { | ||
trailingComma: "es5", | ||
tabWidth: 4, | ||
semi: false, | ||
singleQuote: true, | ||
}; | ||
|
||
module.exports = config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters