Skip to content

Commit

Permalink
Code style
Browse files Browse the repository at this point in the history
  • Loading branch information
DanTheMan827 committed Jan 25, 2025
1 parent 7594497 commit 8a995cd
Show file tree
Hide file tree
Showing 5 changed files with 1,140 additions and 67 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
58 changes: 58 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import pluginJs from "@eslint/js";

/** @type {import('eslint').Linter.Config[]} */
export default [
{
files: ["ntag215.js"],
languageOptions: {
sourceType: "script"
}
},
{
languageOptions: {
globals: {
process: "readonly",
require: "readonly",
clearTimeout: "readonly",
setTimeout: "readonly",
setWatch: "readonly",
clearWatch: "readonly",
console: "readonly",
E: "readonly",
NRF: "readonly",
analogWrite: "readonly",
digitalWrite: "readonly",
D14: "readonly"
}
}
},
pluginJs.configs.recommended,
{
rules: {
"prefer-const": ["warn", {
"destructuring": "all",
"ignoreReadBeforeAssign": true
}],
"no-unused-vars": ["error", {
"varsIgnorePattern": "^_|fastMode",
"argsIgnorePattern": "^_"
}],
"no-var": "error",
"indent": ["error", 2, { "SwitchCase": 1 }],
"quotes": ["error", "double"],
"semi": ["error", "always"],
"comma-dangle": ["error", "never"],
"space-before-function-paren": ["error", "never"],
"keyword-spacing": ["error", { "before": true, "after": true }],
"newline-before-return": "error",
"padding-line-between-statements": [
"error",
{ "blankLine": "always", "prev": "*", "next": "return" },
{ "blankLine": "always", "prev": ["const", "let", "var"], "next": "*"},
{ "blankLine": "any", "prev": ["const", "let", "var"], "next": ["const", "let", "var"] },
{ "blankLine": "always", "prev": "*", "next": ["if", "for", "while", "switch", "try"] },
{ "blankLine": "always", "prev": ["if", "for", "while", "switch", "try"], "next": "*" }
]
}
}
];
Loading

0 comments on commit 8a995cd

Please sign in to comment.