mirror of
https://github.com/vrana/adminer.git
synced 2025-08-05 06:07:57 +02:00
JS: Add ESLint config
To use this: Create package.json and run: npm install --save-dev eslint @eslint/js
This commit is contained in:
26
eslint.config.mjs
Normal file
26
eslint.config.mjs
Normal file
@@ -0,0 +1,26 @@
|
||||
// prepend adminer/include/functions.js to adminer/include/editing.js and editor/include/editing.js, then delete
|
||||
|
||||
import { globalIgnores } from "eslint/config";
|
||||
import js from "@eslint/js";
|
||||
import globals from "globals";
|
||||
|
||||
export default [
|
||||
globalIgnores(["externals/"]),
|
||||
js.configs.recommended,
|
||||
{
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.browser,
|
||||
jush: false, jushLinks: false,
|
||||
offlineMessage: false, thousandsSeparator: false, // include/design.inc.php
|
||||
indexColumns: false, // select.inc.php
|
||||
tablePos: false, em: false, // schema.inc.php
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
"no-var": "error",
|
||||
"prefer-const": "error",
|
||||
"no-unused-vars": "off", //! we want this only on global level
|
||||
},
|
||||
},
|
||||
];
|
Reference in New Issue
Block a user