Skip to content

Commit

Permalink
feat(main): [max-len] ignore urls strings, templateLiterals, and RegE…
Browse files Browse the repository at this point in the history
…xpLiterals (#353)
  • Loading branch information
Hazmi35 authored Jan 17, 2022
1 parent 96a5229 commit 55e3de7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,14 @@
"keyword-spacing": ["warn", { "before": true, "after": true }],
"linebreak-style": ["error", "unix"],
"lines-between-class-members": ["warn", "always", { "exceptAfterSingleLine": true }],
"max-len": ["warn", { "code": 180, "tabWidth": 4 }],
"max-len": ["warn", {
"code": 180,
"tabWidth": 4,
"ignoreUrls": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true,
"ignoreRegExpLiterals": true
}],
"max-statements-per-line": ["warn", { "max": 3 }],
"multiline-ternary": ["warn", "always-multiline"],
"new-parens": "warn",
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const { resolve } = require("path");
const { readFileSync } = require("fs");
const stripJsonComments = require("strip-json-comments");

// TODO: Why dont just place everything here instead of .eslintrc.json?
const file = readFileSync(resolve(__dirname, ".eslintrc.json")).toString();

module.exports = JSON.parse(stripJsonComments(file));

0 comments on commit 55e3de7

Please sign in to comment.