mirror of
https://github.com/webrecorder/browsertrix-crawler.git
synced 2025-10-19 06:23:16 +00:00

This adds prettier to the repo, and sets up the pre-commit hook to auto-format as well as lint. Also updates ignores files to exclude crawls, test-crawls, scratch, dist as needed.
32 lines
650 B
JavaScript
32 lines
650 B
JavaScript
module.exports = {
|
|
env: {
|
|
browser: true,
|
|
es2021: true,
|
|
node: true,
|
|
jest: true,
|
|
},
|
|
extends: [
|
|
"eslint:recommended",
|
|
"plugin:@typescript-eslint/recommended",
|
|
"prettier",
|
|
],
|
|
parser: "@typescript-eslint/parser",
|
|
plugins: ["@typescript-eslint"],
|
|
parserOptions: {
|
|
ecmaVersion: 12,
|
|
sourceType: "module",
|
|
},
|
|
rules: {
|
|
"no-constant-condition": ["error", { checkLoops: false }],
|
|
"no-use-before-define": [
|
|
"error",
|
|
{
|
|
variables: true,
|
|
functions: false,
|
|
classes: false,
|
|
allowNamedExports: true,
|
|
},
|
|
],
|
|
},
|
|
reportUnusedDisableDirectives: true,
|
|
};
|