Skip to content

Commit 3ecd6bc

Browse files
Set up initial lint configuration
1 parent 65b77c1 commit 3ecd6bc

File tree

3 files changed

+47
-40
lines changed

3 files changed

+47
-40
lines changed

.eslintrc

-38
This file was deleted.

.eslintrc.js

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
node: true,
5+
},
6+
ignorePatterns: ['node_modules', 'dist'],
7+
parser: '@babel/eslint-parser',
8+
parserOptions: {
9+
ecmaVersion: 6,
10+
sourceType: 'module',
11+
ecmaFeatures: {
12+
modules: true,
13+
},
14+
},
15+
globals: {
16+
mParticle: true,
17+
describe: true,
18+
assert: true,
19+
Should: true,
20+
MockHttpServer: true,
21+
it: true,
22+
sinon: true,
23+
const: true,
24+
before: true,
25+
beforeEach: true,
26+
afterEach: true,
27+
after: true,
28+
Promise: true,
29+
},
30+
extends: [
31+
// Recommended rules
32+
'eslint:recommended',
33+
34+
// Turn off conflicting rules
35+
'prettier',
36+
],
37+
rules: {
38+
'prettier/prettier': 'error',
39+
'no-prototype-builtins': 'off',
40+
'no-empty': 'warn',
41+
'no-unused-vars': 'warn',
42+
'no-useless-escape': 'off',
43+
},
44+
};

.prettierrc

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
2+
"semi": true,
23
"singleQuote": true,
3-
"trailingComma": "es5",
4-
"tabWidth": 4
4+
"trailingComma": "all",
5+
"tabWidth": 4,
56
}

0 commit comments

Comments
 (0)