-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
50 lines (44 loc) · 1.78 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// ╔═╗╔═╗╦ ╦╔╗╔╔╦╗┬─┐┌─┐
// ║╣ ╚═╗║ ║║║║ ║ ├┬┘│
// o╚═╝╚═╝╩═╝╩╝╚╝ ╩ ┴└─└─┘
// A set of basic code conventions designed to encourage quality and consistency
// across your Sails app's code base. These rules are checked against
// automatically any time you run `npm test`.
//
// > Note: If you're using mocha, you'll want to add an extra override file to your
// > `test/` folder so that eslint will tolerate mocha-specific globals like `before`
// > and `describe`.
// Designed for ESLint v4.
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// For more information about any of the rules below, check out the relevant
// reference page on eslint.org. For example, to get details on "no-sequences",
// you would visit `http://eslint.org/docs/rules/no-sequences`. If you're unsure
// or could use some advice, come by https://sailsjs.com/support.
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
module.exports = {
env: {
node: true,
},
parserOptions: {
ecmaVersion: 8,
},
root: true,
// extending recommended config and config derived from eslint-config-prettier
extends: ["eslint:recommended", "prettier"],
// activating eslint-plugin-prettier (--fix stuff)
plugins: ["prettier"],
rules: {
// customizing prettier rules (unfortunately not many of them are customizable)
"prettier/prettier": [
"error",
{
arrowParens: "always",
endOfLine: "lf",
printWidth: 80,
tabWidth: 3,
},
],
// eslint rule customization here:
"no-console": 0, // allow console.log() in our services
},
};