.eslintrc.js revision 868ff5aa364759d09f6865fcd88839e4cfe5c4c0
4632N/Amodule.exports = {
4632N/A root: true,
4632N/A extends: [
4632N/A "forgerock"
4632N/A ],
4632N/A parser: "babel-eslint",
4632N/A parserOptions: {
4632N/A ecmaVersion: 6
4632N/A },
4632N/A env: {
4632N/A amd: true,
4632N/A browser: true
4632N/A },
4632N/A rules: {
4632N/A /*
4632N/A * --------------------------------------------------------------------------------
4632N/A * ERROR RULES
4632N/A *
4632N/A * These are rules we're sure about. They will cause the build to fail.
4632N/A * --------------------------------------------------------------------------------
4632N/A */
4632N/A "array-bracket-spacing": [2, "never"],
4632N/A "arrow-body-style": [2, "as-needed"],
4632N/A "arrow-parens": [2, "always"],
4632N/A "arrow-spacing": 2,
4632N/A "block-spacing": [2, "always"],
4632N/A "brace-style": [2, "1tbs", { "allowSingleLine": true }],
4632N/A "camelcase": [2, {
4632N/A "properties": "always"
4632N/A }],
4632N/A "comma-spacing": [2, {
4632N/A "before": false,
4632N/A "after": true
4632N/A }],
4632N/A "comma-style": 2,
4632N/A "dot-location": [2, "property"],
4632N/A "eol-last": 2,
4632N/A "guard-for-in": 2,
4632N/A "indent": [2, 4, {
4632N/A "SwitchCase": 1,
4632N/A "VariableDeclarator": 1
4632N/A }],
4632N/A "keyword-spacing": 2,
4632N/A "max-len": [2, 120, 4],
4632N/A "new-cap": [2, {
4632N/A "capIsNew": false
4632N/A }],
4632N/A "new-parens": 2,
4632N/A "no-alert": 2,
4632N/A "no-bitwise": 2,
4632N/A "no-catch-shadow": 2,
4632N/A "no-confusing-arrow": 2,
4632N/A "no-constant-condition": 2,
4632N/A "no-continue": 2,
4632N/A "no-duplicate-case": 2,
4632N/A "no-empty-character-class": 2,
4632N/A "no-empty-pattern": 2,
4632N/A "no-extend-native": 2,
4632N/A "no-implicit-globals": 2,
4632N/A "no-invalid-regexp": 2,
4632N/A "no-irregular-whitespace": 2,
4632N/A "no-labels": 2,
4632N/A "no-lonely-if": 2,
4632N/A "no-mixed-spaces-and-tabs": 2,
4632N/A "no-multiple-empty-lines": 2,
4632N/A "no-multi-spaces": 2,
4632N/A "no-multi-str": 2,
4632N/A "no-native-reassign": 2,
4632N/A "no-self-assign": 2,
4632N/A "no-trailing-spaces": 2,
4632N/A "no-unmodified-loop-condition": 2,
4632N/A "no-unused-vars": 2,
4632N/A "no-useless-escape": 2,
4632N/A "no-void": 2,
4632N/A "no-whitespace-before-property": 2,
4632N/A "object-curly-spacing": [2, "always"],
4632N/A "operator-linebreak": 2,
4632N/A "prefer-const": 2,
4632N/A "quotes": [2, "double", "avoid-escape"],
4632N/A "semi-spacing": [2, {
4632N/A "before": false,
4632N/A "after": true
4632N/A }],
4632N/A "space-before-blocks": [2, "always"],
4632N/A "space-before-function-paren": [2, "always"],
4632N/A "space-in-parens": [2, "never"],
4632N/A "space-infix-ops": [2, {
4632N/A "int32Hint": false
4632N/A }],
4632N/A "space-unary-ops": 2,
4632N/A "template-curly-spacing": 2,
4632N/A "valid-jsdoc": [2, {
4632N/A "prefer": {
4632N/A "return": "returns"
4632N/A },
4632N/A "requireReturn": false
4632N/A }],
4632N/A "yoda": [2, "never"],
4632N/A
4632N/A /*
4632N/A * --------------------------------------------------------------------------------
4632N/A * WARNING RULES
4632N/A *
4632N/A * These are rules that we want to turn into errors but can't yet because there are
4632N/A * too many violations. As we fix the violations, we will transition them into
4632N/A * error rules.
4632N/A * --------------------------------------------------------------------------------
4632N/A */
4632N/A "no-var": 1,
4632N/A "prefer-arrow-callback": 1,
4632N/A "prefer-template": 1,
4632N/A "object-shorthand": 1,
4632N/A "prefer-spread": 1,
4632N/A
4632N/A // TODO: Need an abstraction for logging before we can enable this.
4632N/A //"no-console": 0
4632N/A //"no-param-reassign": 0
4632N/A
4632N/A
4632N/A /**
4632N/A * Disabled because these rules aren't available in ESLint 2.0.
4632N/A * TODO: Remove them from eslint-config-forgerock
4632N/A */
4632N/A "no-empty-label": 0,
4632N/A "space-return-throw-case": 0
4632N/A }
4632N/A};
4632N/A