Skip to content

Commit

Permalink
⬆️ eslint & grunt-eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
llaumgui committed Apr 28, 2024
1 parent ad76358 commit ccd9323
Show file tree
Hide file tree
Showing 6 changed files with 184 additions and 304 deletions.
52 changes: 0 additions & 52 deletions .eslintrc.json

This file was deleted.

3 changes: 0 additions & 3 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ module.exports = (grunt) ->
grunt.loadNpmTasks 'grunt-eslint'
grunt.loadNpmTasks 'grunt-jsonlint'
grunt.loadNpmTasks 'grunt-coffeelint'
grunt.loadNpmTasks 'grunt-markdownlint'

# ================================= Settings ================================= #
# Force use of Unix newlines
Expand Down Expand Up @@ -79,8 +78,6 @@ module.exports = (grunt) ->
# ------
# JS
eslint:
options:
overrideConfigFile: '.eslintrc.json'
target: ['src/*.js']
# JSON
jsonlint:
Expand Down
66 changes: 66 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
const js = require("@eslint/js");
const globals = require("globals");

module.exports = [
js.configs.recommended,
{
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
globals: {
...globals.mocha,
...globals.node,
},
},
rules: {
"array-bracket-spacing": 2,
"brace-style": 2,
camelcase: 2,
"comma-dangle": 0,
"comma-spacing": 2,
"comma-style": 2,
"computed-property-spacing": 2,
curly: 2,
"dot-location": [2, "property"],
"dot-notation": 2,
"eol-last": 2,
eqeqeq: 2,
"guard-for-in": 2,
indent: [
2,
4,
{
SwitchCase: 1,
VariableDeclarator: 0,
},
],
"key-spacing": 2,
"newline-after-var": 2,
"no-caller": 2,
"no-console": 0,
"no-else-return": 2,
"no-eval": 2,
"no-extend-native": 2,
"no-lonely-if": 2,
"no-loop-func": 2,
"no-multi-spaces": 2,
"no-trailing-spaces": 2,
"one-var": [2, "never"],
quotes: [2, "single", "avoid-escape"],
semi: 2,
"space-before-blocks": 2,
"space-before-function-paren": 2,
"space-in-parens": 2,
"space-unary-ops": [
2,
{
nonwords: false,
words: true,
},
],
strict: [2, "global"],
"vars-on-top": 2,
yoda: 2,
},
},
];
Loading

0 comments on commit ccd9323

Please sign in to comment.