Skip to content

Commit

Permalink
Fix NPM warnings, round 2 (#1332)
Browse files Browse the repository at this point in the history
Co-authored-by: Melroy van den Berg <[email protected]>
  • Loading branch information
garrettw and melroy89 authored Dec 30, 2024
1 parent a96fef6 commit fd94b63
Show file tree
Hide file tree
Showing 5 changed files with 274 additions and 401 deletions.
50 changes: 0 additions & 50 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion assets/app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import './bootstrap.js';
import './styles/app.scss';
import './utils/popover';
import './utils/popover.js';
import '@github/markdown-toolbar-element';
import { Application } from '@hotwired/stimulus';

Expand Down
67 changes: 67 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import js from "@eslint/js";
import globals from "globals";
import stylistic from "@stylistic/eslint-plugin";

export default [
{
ignores: ["*", "!assets"],
},
js.configs.recommended,
{
plugins: {
"@stylistic": stylistic,
},
languageOptions: {
globals: {
...globals.browser,
...globals.node,
...globals.es2021
},
ecmaVersion: "latest",
sourceType: "module",
},
rules: {
"@stylistic/indent": ["error", 4],
"@stylistic/linebreak-style": ["error", "unix"],
"@stylistic/eol-last": ["error", "always"],
"@stylistic/arrow-parens": ["error", "always"],
"@stylistic/brace-style": ["error", "1tbs"],
"@stylistic/comma-dangle": ["error", "always-multiline"],
"@stylistic/comma-spacing": ["error"],
"@stylistic/keyword-spacing": ["error"],
"@stylistic/no-multiple-empty-lines": ["error", {
max: 2,
maxEOF: 0,
maxBOF: 0,
}],
"@stylistic/no-trailing-spaces": ["error"],
"@stylistic/no-multi-spaces": ["error"],
"@stylistic/object-curly-spacing": ["error", "always"],
"@stylistic/quotes": ["error", "single", {
avoidEscape: true,
}],
"@stylistic/semi": ["error", "always"],
"@stylistic/space-before-blocks": ["error"],
"@stylistic/space-in-parens": ["error", "never"],
camelcase: ["error", {
ignoreImports: true,
}],
curly: ["error", "all"],
eqeqeq: ["error", "always"],
"no-console": ["off"],
"no-duplicate-imports": ["error"],
"no-empty": ["error", {
allowEmptyCatch: true,
}],
"no-empty-function": ["error", {
allow: ["arrowFunctions", "constructors"],
}],
"no-eval": ["error"],
"no-implicit-coercion": ["error"],
"no-implied-eval": ["error"],
"prefer-const": ["error"],
"sort-imports": ["error"],
yoda: ["error", "always"],
},
}
];
Loading

0 comments on commit fd94b63

Please sign in to comment.