UNPKG

1.1 kBJavaScriptView Raw
1module.exports = {
2 env: {
3 es6: true
4 },
5 parserOptions: {
6 sourceType: "module"
7 },
8 settings: {
9 "import/extensions": [".js", ".jsx"],
10 "import/ignore": [
11 "node_modules",
12 "\\.(coffee|scss|css|less|hbs|svg|json)$"
13 ],
14 "import/resolver": {
15 node: {
16 extensions: [".js", ".json"]
17 }
18 }
19 },
20 rules: {
21 // -> Helpful warnings
22 "@swissquote/swissquote/import/export": "error", // Report any invalid exports, i.e. re-export of the same name
23
24 // -> Style guide
25 // We only enable the rules that do a surface analysis,
26 // all rules that require a deep analysis are very costly
27 // and often fail with the module structure of crafty
28 "@swissquote/swissquote/import/first": "error", // Ensure all imports appear before other statements
29 "@swissquote/swissquote/import/newline-after-import": "error", // Enforce a newline after import statements
30 "@swissquote/swissquote/import/no-absolute-path": "error",
31 "@swissquote/swissquote/import/no-webpack-loader-syntax": "error" // Forbid Webpack loader syntax in imports.
32 }
33};