|
| 1 | +var neostandard = require('neostandard'); |
| 2 | +// var globals = require("globals"); |
| 3 | +// import globals from "globals"; |
| 4 | +const globals = require('globals'); |
| 5 | + |
| 6 | +module.exports = [ |
| 7 | + ...neostandard({ |
| 8 | + semi: true |
| 9 | + }), { |
| 10 | + languageOptions: { |
| 11 | + globals: { |
| 12 | + ...globals.browser, |
| 13 | + sinon: true |
| 14 | + } |
| 15 | + }, |
| 16 | + rules: { |
| 17 | + '@stylistic/indent': ['error', 2, { |
| 18 | + CallExpression: {arguments: 'first'}, |
| 19 | + MemberExpression: 'off', |
| 20 | + SwitchCase: 1, |
| 21 | + VariableDeclarator: 2 |
| 22 | + }], |
| 23 | + '@stylistic/key-spacing': 'off', |
| 24 | + '@stylistic/multiline-ternary': 'off', |
| 25 | + '@stylistic/no-multi-spaces': 'off', |
| 26 | + '@stylistic/object-curly-newline': 'off', |
| 27 | + '@stylistic/object-curly-spacing': 'off', |
| 28 | + '@stylistic/object-shorthand': 'off', |
| 29 | + '@stylistic/operator-linebreak': 'off', |
| 30 | + '@stylistic/padded-blocks': 'off', |
| 31 | + '@stylistic/space-before-function-paren': ['error', {anonymous: 'always', named: 'never'}], |
| 32 | + '@stylistic/spaced-comment': 'off', |
| 33 | + camelcase: 'off', |
| 34 | + 'new-cap': 'off', |
| 35 | + 'no-loss-of-precision': 'off', |
| 36 | + 'no-prototype-builtins': 'off', |
| 37 | + 'no-throw-literal': 'off', |
| 38 | + 'no-unneeded-ternary': 'off', |
| 39 | + 'no-useless-call': 'off', |
| 40 | + 'no-var': 'off', |
| 41 | + 'object-shorthand': 'off', |
| 42 | + 'one-var': 'off', |
| 43 | + yoda: 'off' |
| 44 | + } |
| 45 | + }, { |
| 46 | + files: ['examples/**', 'tutorials/**'], |
| 47 | + languageOptions: { |
| 48 | + globals: { |
| 49 | + ...globals.browser, |
| 50 | + $: true, |
| 51 | + CodeMirror: true, |
| 52 | + d3: true, |
| 53 | + geo: true, |
| 54 | + sinon: true |
| 55 | + } |
| 56 | + }, |
| 57 | + rules: { |
| 58 | + } |
| 59 | + }, { |
| 60 | + files: ['tests/**'], |
| 61 | + languageOptions: { |
| 62 | + globals: { |
| 63 | + ...globals.jasmine, |
| 64 | + sinon: true |
| 65 | + } |
| 66 | + }, |
| 67 | + rules: { |
| 68 | + } |
| 69 | + }, { |
| 70 | + ignores: [ |
| 71 | + 'src/util/distanceGrid.js', |
| 72 | + 'dist/**', |
| 73 | + 'website/**', |
| 74 | + '**/*.min.js', |
| 75 | + 'jsdoc/template/publish.js', |
| 76 | + 'jsdoc/template/static/**', |
| 77 | + 'jsdoc/template/tmpl/**', |
| 78 | + '_build/**', |
| 79 | + 'docs/_build/**', |
| 80 | + ] |
| 81 | + } |
| 82 | +]; |
0 commit comments