summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2025-01-15 10:50:30 +0100
committerTor Andersson <tor@ccxvii.net>2025-01-15 10:50:30 +0100
commite0b464ff6cd1dd66a1a81d33385b3558b52bf0be (patch)
tree31bebd7c3454a0d143ccf0cd1a31bd8fa1438093
parent72c4f00c94b012301d09400c3564285099870454 (diff)
download1989-dawn-of-freedom-e0b464ff6cd1dd66a1a81d33385b3558b52bf0be.tar.gz
add eslintrc
-rw-r--r--.eslintrc.js17
-rw-r--r--.exrc1
2 files changed, 18 insertions, 0 deletions
diff --git a/.eslintrc.js b/.eslintrc.js
new file mode 100644
index 0000000..54e057e
--- /dev/null
+++ b/.eslintrc.js
@@ -0,0 +1,17 @@
+module.exports = {
+ env: {
+ browser: true,
+ commonjs: true,
+ es2021: true,
+ },
+ extends: "eslint:recommended",
+ parserOptions: {
+ ecmaVersion: "latest",
+ },
+ rules: {
+ "no-constant-binary-expression": "error",
+ indent: [ "warn", "tab", { SwitchCase: 1 } ],
+ semi: [ "error", "never" ],
+ "no-unused-vars": [ "error", { "vars": "all", "args": "all", "varsIgnorePattern": "^[CS]_", "argsIgnorePattern": "^_" } ],
+ },
+}
diff --git a/.exrc b/.exrc
new file mode 100644
index 0000000..2fa9dac
--- /dev/null
+++ b/.exrc
@@ -0,0 +1 @@
+autocmd BufRead *.js :set formatprg=prettier\ --parser\ babel\ --use-tabs\ --no-semi\ --print-width\ 120\ --single-quote