Skip to content

Commit e8dca5c

Browse files
authored
Merge pull request #1362 from LLazyEmail/1353-enable-rules-for-eslint
fix eslint end remove two rules
2 parents ae536f6 + 4dcb4d8 commit e8dca5c

File tree

21 files changed

+107
-90
lines changed

21 files changed

+107
-90
lines changed

.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
src/parserMDReact/tests/_generated/
2-
src/constants/regexp/tests
2+
src/constants/regexp/tests
3+
.eslintrc.js

eslintrc.js renamed to .eslintrc.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module.exports = {
2323
sourceType: 'module',
2424
},
2525
rules: {
26-
'import/no-unresolved': 0,
26+
// 'import/no-unresolved': 0,
2727
'import/no-dynamic-require': 0,
2828
'global-require': 0,
2929
'no-param-reassign': 0,
@@ -34,7 +34,6 @@ module.exports = {
3434
"quotes": 0,
3535
'comma-dangle': 0,
3636
'no-useless-escape': 0,
37-
'no-unused-vars': 0,
3837
'no-tabs': 0,
3938
'no-underscore-dangle': 0, // maybe fix it later and remove _header variables
4039
'import/no-cycle': 0, // TODO https://github.com/LLazyEmail/markdown-to-email/issues/1286

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"emptyT": "npm run build && cross-env PARSE=plainEmpty node ./dist/bundle",
1515
"defaultT": "npm run build && cross-env PARSE=plainTemplate node ./dist/bundle",
1616
"test:react": "npm run checkFolders && jest ./src/parserMDReact/tests",
17-
"lint:fix": "eslint -c ./eslintrc.js ./src --fix --ignore-pattern \"./package.json\" ",
18-
"lint": "eslint -c ./eslintrc.js ./src --quiet --ignore-pattern \"./package.json\" ",
17+
"lint:fix": "eslint -c ./.eslintrc.js ./src --fix --ignore-pattern \"./package.json\" ",
18+
"lint": "eslint -c ./.eslintrc.js ./src --quiet --ignore-pattern \"./package.json\" ",
1919
"build:small": "npm run checkFolders && node ./src/index.js",
2020
"checkFolders": "node ./checkFolders",
2121
"test": "npm run checkFolders && jest ./src/tests",

src/callbacks/helpers.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
import { mapKeys } from 'lodash';
21
import { catchErrorTraceOutput } from '../domain/error-handle/index';
32

43
// I think this method will be deleted or we'll update our
54
// current version like W3_getWrapper
65
function getWrapper(name, config) {
76
const { layouts, folder } = config;
87

9-
// console.log(layouts);
10-
118
try {
129
const wrapper = layouts[folder][name];
1310
return wrapper;
@@ -17,10 +14,7 @@ function getWrapper(name, config) {
1714
return false;
1815
}
1916

20-
// console.log(wrapper);
21-
2217
// here we can have a problem, because we're passing more information into a config that it was before
23-
2418
const _loopForWrapper = (config, component) => {
2519
try {
2620
return component(config);

src/callbacks/html/methods/br.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { newLine } from '../helpers';
22

3-
import { commonReplace } from '../../../domain/replace-wrapper3.0';
3+
// import { commonReplace } from '../../../domain/replace-wrapper3.0';
44

55
// TODO figure out `text` argument
66
function _br(text, newLines) {

src/callbacks/html/methods/header.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
import { newLine, beforeBeginingNewLine } from '../helpers';
1+
import {
2+
newLine,
3+
// beforeBeginingNewLine
4+
} from '../helpers';
25

36
import { commonReplace } from '../../../domain/replace-wrapper3.0';
47

src/callbacks/html/methods/italic.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
import { commonReplace } from '../../../domain/replace-wrapper3.0';
22

3-
const _italic = (text, content, a, b, c) => {
3+
const _italic = (
4+
text,
5+
// content,
6+
// a,
7+
// b,
8+
// c
9+
) => {
410
// TODO we need to debug italic
511
// https://github.com/LLazyEmail/markdown-to-email/issues/1265
612
// console.log(text)
@@ -22,7 +28,10 @@ const _italic = (text, content, a, b, c) => {
2228
return replaced;
2329
};
2430

25-
const _italicAsterix = (text, content) => {
31+
const _italicAsterix = (
32+
text,
33+
// content
34+
) => {
2635
// console.log(text);
2736
// console.log(content);
2837

src/callbacks/html/methods/lists.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import {
22
// replaceWrapper,
33
newLine,
4-
beforeBeginingNewLine,
5-
beforeEnd,
4+
// beforeBeginingNewLine,
5+
// beforeEnd,
66
} from '../helpers';
77

88
import { REGEXP_SUB_LISTS } from '../../../domain/regular-expressions';

src/callbacks/html/methods/separator.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ import { newLine } from '../helpers';
22

33
import { commonReplace } from '../../../domain/replace-wrapper3.0';
44

5-
function _separator(text, content) {
5+
function _separator(
6+
text,
7+
// content
8+
) {
69
// console.log(text);
710
// console.log(content);
811

src/callbacks/html/methods/simple-without-replacer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { newLine } from '../helpers';
2-
import { commonReplace } from '../../../domain/replace-wrapper3.0';
2+
// import { commonReplace } from '../../../domain/replace-wrapper3.0';
33

44
const _del = () => '<del>$1</del>';
55

0 commit comments

Comments
 (0)