Skip to content

Commit 103bc40

Browse files
Add linters (#10)
* Add prettier for code formatting Create a prettier config file - `.prettierrc` that hosts formatting configuration. * Add eslint with default configurations for a Node.js environment Include npm scripts for running eslint and prettier with `lint` and `format` scripts.
1 parent 7ba9145 commit 103bc40

File tree

4 files changed

+1131
-50
lines changed

4 files changed

+1131
-50
lines changed

.prettierrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"semi": true,
3+
"singleQuote": false,
4+
"tabWidth": 2,
5+
"useTabs": false,
6+
"printWidth": 80,
7+
"trailingComma": "none",
8+
"endOfLine": "lf"
9+
}

eslint.config.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import globals from "globals";
2+
import pluginJs from "@eslint/js";
3+
4+
/** @type {import('eslint').Linter.Config[]} */
5+
export default [
6+
{ languageOptions: { globals: globals.node } },
7+
pluginJs.configs.recommended
8+
];

0 commit comments

Comments
 (0)