mirror of
https://github.com/HorlogeSkynet/thunderbird-user.js.git
synced 2025-05-14 20:52:19 -04:00
Migrates ESLint configuration to new (9+) "flat format"
This commit is contained in:
parent
7390a8056c
commit
ee7649a8b4
3 changed files with 38 additions and 49 deletions
36
.eslint.config.mjs
Normal file
36
.eslint.config.mjs
Normal file
|
@ -0,0 +1,36 @@
|
|||
// Thunderbird User.JS ESLint configuration file
|
||||
|
||||
import js from "@eslint/js";
|
||||
|
||||
export default [
|
||||
js.configs.recommended,
|
||||
{
|
||||
rules: {
|
||||
// Expect only double-quoted strings.
|
||||
quotes: ["error", "double"],
|
||||
|
||||
// Expect a semicolon after each statement.
|
||||
semi: ["error", "always", {"omitLastInOneLineBlock": false}],
|
||||
|
||||
// As project code style, don't allow tabulation nor trailing whitespaces.
|
||||
"no-tabs": "error",
|
||||
"no-trailing-spaces": "error",
|
||||
|
||||
// Don't allow whitespace before semicolons.
|
||||
"semi-spacing": ["error", {"before": false}],
|
||||
|
||||
// Don't allow irregular whitespace characters in our sheet.
|
||||
"no-irregular-whitespace": ["error", {"skipStrings": false, "skipComments": false}],
|
||||
},
|
||||
languageOptions: {
|
||||
// From <https://searchfox.org/mozilla-central/rev/c938c7416c633639a5c8ce4412be586eefb48005/modules/libpref/parser/src/lib.rs#296>
|
||||
globals: {
|
||||
pref: "readonly",
|
||||
user_pref: "readonly",
|
||||
sticky: "readonly",
|
||||
locked: "readonly",
|
||||
sticky_pref: "readonly",
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
Loading…
Add table
Add a link
Reference in a new issue