Skip to content

Commit

Permalink
ci: upgrade eslint config for v9
Browse files Browse the repository at this point in the history
  • Loading branch information
stdavis committed Sep 27, 2024
1 parent d991f55 commit fa5b615
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 103 deletions.
95 changes: 0 additions & 95 deletions .eslintrc

This file was deleted.

3 changes: 0 additions & 3 deletions GruntFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,6 @@ module.exports = function (grunt) {
eslint: {
main: {
src: eslintFiles
},
options: {
overrideConfigFile: '.eslintrc'
}
},
pkg: grunt.file.readJSON('package.json'),
Expand Down
72 changes: 72 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
import globals from "globals";

export default [{
languageOptions: {
globals: {
...globals.browser,
...globals.jasmine,
...globals.amd,
...globals.node,
...globals.jquery,
},

ecmaVersion: 8,
sourceType: "commonjs",
},

rules: {
"no-bitwise": 2,
curly: [2, "all"],
eqeqeq: 2,
"no-eq-null": 2,
"guard-for-in": 2,
"no-extend-native": 2,
"no-use-before-define": 2,
complexity: [2, 32],
"no-caller": 2,
"no-irregular-whitespace": 2,
"no-undef": 2,
"no-unused-vars": 2,
"space-return-throw-case": 0,

"keyword-spacing": [2, {
after: true,
}],

"space-before-blocks": [2, "always"],
"wrap-iife": 2,

"space-before-function-paren": [2, {
anonymous: "always",
named: "never",
}],

"no-empty": 2,
"array-bracket-spacing": [2, "never"],
"space-in-parens": [2, "never"],
"comma-style": [2, "last"],
"space-unary-ops": 0,
"space-infix-ops": 2,
"no-with": 2,

indent: [2, 4, {
SwitchCase: 1,
}],

"no-mixed-spaces-and-tabs": 2,
"no-trailing-spaces": 2,
"comma-dangle": [2, "never"],
"brace-style": 2,
"eol-last": 2,
"new-cap": 2,
"dot-notation": 2,
"no-multi-str": 2,

"key-spacing": [2, {
afterColon: true,
}],

"one-var": [2, "never"],
quotes: [2, "single"],
},
}];
21 changes: 18 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "2.11.4",
"devDependencies": {
"bower": "^1.8.14",
"globals": "^15.9.0",
"grunt": "^1.6.1",
"grunt-bump": "^0.8.0",
"grunt-cache-breaker": "^2.0.1",
Expand Down
4 changes: 2 additions & 2 deletions src/app/app.profile.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*eslint-disable no-unused-vars, no-undef */
/*eslint-disable no-undef */
profile = {
resourceTags: {
test: function (filename, mid) {
Expand All @@ -20,4 +20,4 @@ profile = {
}
}
};
/*eslint-enable no-unused-vars, no-undef */
/*eslint-enable no-undef */

0 comments on commit fa5b615

Please sign in to comment.