diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index da0bda8..0000000 --- a/.eslintrc +++ /dev/null @@ -1,95 +0,0 @@ -{ - "env": { - "browser": true, - "jasmine": true, - "amd": true, - "node": true, - "jquery": true - }, - "parserOptions": { - "ecmaVersion": 8 - }, - "globals": {}, - "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" - ] - } -} diff --git a/GruntFile.js b/GruntFile.js index 7d91a20..67a3e25 100644 --- a/GruntFile.js +++ b/GruntFile.js @@ -110,9 +110,6 @@ module.exports = function (grunt) { eslint: { main: { src: eslintFiles - }, - options: { - overrideConfigFile: '.eslintrc' } }, pkg: grunt.file.readJSON('package.json'), diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..84875f9 --- /dev/null +++ b/eslint.config.mjs @@ -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"], + }, +}]; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 8cdb2d2..75502d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ }, "devDependencies": { "bower": "^1.8.14", + "globals": "^15.9.0", "grunt": "^1.6.1", "grunt-bump": "^0.8.0", "grunt-cache-breaker": "^2.0.1", @@ -236,6 +237,19 @@ } } }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@eslint/eslintrc/node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -5234,10 +5248,11 @@ } }, "node_modules/globals": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", - "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "version": "15.9.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.9.0.tgz", + "integrity": "sha512-SmSKyLLKFbSr6rptvP8izbyxJL4ILwqO9Jg23UA0sDlGlu58V59D1//I3vlc0KJphVdUR7vMjHIplYnzBxorQA==", "dev": true, + "license": "MIT", "engines": { "node": ">=18" }, diff --git a/package.json b/package.json index 2ed5fd5..31b8779 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/app/app.profile.js b/src/app/app.profile.js index 510e356..213467b 100644 --- a/src/app/app.profile.js +++ b/src/app/app.profile.js @@ -1,4 +1,4 @@ -/*eslint-disable no-unused-vars, no-undef */ +/*eslint-disable no-undef */ profile = { resourceTags: { test: function (filename, mid) { @@ -20,4 +20,4 @@ profile = { } } }; -/*eslint-enable no-unused-vars, no-undef */ +/*eslint-enable no-undef */