Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to enable ESLint #175

Open
rvarbanov opened this issue Apr 18, 2016 · 8 comments
Open

Not able to enable ESLint #175

rvarbanov opened this issue Apr 18, 2016 · 8 comments

Comments

@rvarbanov
Copy link

So today we updated our project to use ESLint from ESHint and JSCS, because of JSCS merging with ESLint and not being supported anymore.

I added the line of code you suggest on the home page "interactive-linter.javascript": ["eslint"], but that only disable the default.

In our setup we are using .eslintrc.js to load our rules and styles.

module.exports = {
    'root': true,
    'env': {
        'es6': true,
        'node': true
    },
    'extends': 'eslint:recommended',
    'rules': {
        'accessor-pairs': 'error',
        'array-bracket-spacing': 'error',
        'array-callback-return': 'error',
        'arrow-body-style': 'off',
        'arrow-parens': 'off',
        'arrow-spacing': [
            'error',
            {
                'after': true,
                'before': true
            }
        ],
        'block-scoped-var': 'error',
        'block-spacing': [
            'error',
            'always'
        ],
        'brace-style': [
            'error',
            '1tbs',
            {
                'allowSingleLine': true
            }
        ],
        'callback-return': 'error',
        'camelcase': ['error', {'properties': 'never'}],
        'comma-spacing': [
            'error',
            {
                'after': true,
                'before': false
            }
        ],
        'comma-style': [
            'error',
            'last'
        ],
        'complexity': 'error',
        'computed-property-spacing': [
            'error',
            'never'
        ],
        'consistent-return': 'off',
        'consistent-this': 'error',
        'curly': 'error',
        'default-case': 'error',
        'dot-location': ['error', 'property'],
        'dot-notation': [
            'error',
            {
                'allowKeywords': true
            }
        ],
        'eol-last': 'error',
        'eqeqeq': 'error',
        'func-names': 'off',
        'func-style': 'off',
        'generator-star-spacing': 'error',
        'global-require': 'off',
        'guard-for-in': 'error',
        'handle-callback-err': 'off',
        'id-blacklist': 'error',
        'id-length': 'off',
        'id-match': 'error',
        'indent': ['error', 'tab'],
        'init-declarations': 'off',
        'jsx-quotes': 'error',
        'key-spacing': 'error',
        'keyword-spacing': [
            'error',
            {
                'after': true,
                'before': true
            }
        ],
        'linebreak-style': [
            'error',
            'unix'
        ],
        'lines-around-comment': 'off',
        'max-depth': 'error',
        'max-len': 'off',
        'max-nested-callbacks': 'error',
        'max-params': 'off',
        'max-statements': 'off',
        'max-statements-per-line': 'error',
        'new-cap': 'error',
        'new-parens': 'error',
        'newline-after-var': 'off',
        'newline-before-return': 'off',
        'newline-per-chained-call': 'off',
        'no-alert': 'error',
        'no-array-constructor': 'error',
        'no-bitwise': 'error',
        'no-caller': 'error',
        'no-catch-shadow': 'error',
        'no-confusing-arrow': 'off',
        'no-continue': 'error',
        'no-div-regex': 'error',
        'no-duplicate-imports': 'error',
        'no-else-return': 'off',
        'no-empty-function': 'error',
        'no-eq-null': 'error',
        'no-eval': 'error',
        'no-extend-native': 'error',
        'no-extra-bind': 'error',
        'no-extra-label': 'error',
        'no-extra-parens': 'off',
        'no-floating-decimal': 'error',
        'no-implicit-coercion': ['error', {'boolean': false}],
        'no-implicit-globals': 'error',
        'no-implied-eval': 'error',
        'no-inline-comments': 'error',
        'no-invalid-this': 'off',
        'no-iterator': 'error',
        'no-label-var': 'error',
        'no-labels': 'error',
        'no-lone-blocks': 'error',
        'no-lonely-if': 'error',
        'no-loop-func': 'error',
        'no-magic-numbers': 'off',
        'no-mixed-requires': 'error',
        'no-multi-spaces': 'error',
        'no-multi-str': 'error',
        'no-multiple-empty-lines': 'error',
        'no-native-reassign': 'error',
        'no-negated-condition': 'off',
        'no-nested-ternary': 'off',
        'no-new': 'error',
        'no-new-func': 'error',
        'no-new-object': 'error',
        'no-new-require': 'error',
        'no-new-wrappers': 'error',
        'no-octal-escape': 'error',
        'no-param-reassign': 'off',
        'no-path-concat': 'error',
        'no-plusplus': 'error',
        'no-process-env': 'error',
        'no-process-exit': 'error',
        'no-proto': 'error',
        'no-restricted-globals': 'error',
        'no-restricted-imports': 'error',
        'no-restricted-modules': 'error',
        'no-restricted-syntax': 'error',
        'no-return-assign': 'error',
        'no-script-url': 'error',
        'no-self-compare': 'error',
        'no-sequences': 'error',
        'no-shadow': 'off',
        'no-shadow-restricted-names': 'error',
        'no-spaced-func': 'error',
        'no-sync': 'error',
        'no-ternary': 'off',
        'no-throw-literal': 'off',
        'no-trailing-spaces': 'error',
        'no-undef-init': 'error',
        'no-undefined': 'off',
        'no-underscore-dangle': 'off',
        'no-unmodified-loop-condition': 'error',
        'no-unneeded-ternary': 'error',
        'no-unused-expressions': ['error', { 'allowShortCircuit': true, 'allowTernary': true }],
        'no-use-before-define': 'error',
        'no-useless-call': 'error',
        'no-useless-concat': 'error',
        'no-useless-constructor': 'error',
        'no-useless-escape': 'error',
        'no-var': 'off',
        'no-void': 'error',
        'no-warning-comments': 'off',
        'no-whitespace-before-property': 'error',
        'no-with': 'error',
        'object-curly-spacing': 'off',
        'object-shorthand': 'off',
        'one-var': 'off',
        'one-var-declaration-per-line': 'error',
        'operator-assignment': 'error',
        'operator-linebreak': ['error', 'after'],
        'padded-blocks': 'off',
        'prefer-arrow-callback': 'off',
        'prefer-const': 'off',
        'prefer-reflect': 'off',
        'prefer-rest-params': 'error',
        'prefer-spread': 'error',
        'prefer-template': 'off',
        'quote-props': 'off',
        'quotes': [
            'error',
            'single'
        ],
        'radix': [
            'error',
            'always'
        ],
        'require-jsdoc': 'off',
        'require-yield': 'error',
        'semi': 'error',
        'semi-spacing': 'error',
        'sort-imports': 'error',
        'sort-vars': 'off',
        'space-before-blocks': 'error',
        'space-before-function-paren': 'error',
        'space-in-parens': [
            'error',
            'never'
        ],
        'space-infix-ops': 'error',
        'space-unary-ops': 'error',
        'spaced-comment': 'error',
        'strict': 'error',
        'template-curly-spacing': [
            'error',
            'never'
        ],
        'valid-jsdoc': ['error', {'requireReturn': false}],
        'vars-on-top': 'off',
        'wrap-iife': 'error',
        'wrap-regex': 'error',
        'yield-star-spacing': 'error',
        'yoda': [
            'error',
            'never'
        ]
    }
};

I am not sure what I am doing wrong. Please help.

@jmls
Copy link

jmls commented Jun 12, 2016

did you ever get it working ? I seem to have the same problem

@MiguelCastillo
Copy link
Owner

@jmls a PR was submitted by @rvarbanov to support .eslintrc.js. It is currently in master and not yet pushed to the extension registry. I should be pushing it out to the extension registry sometime today. I havent done so because everyone using .eslintrc files will just stop working. It is an unfortunate breaking change we have made to keep up with eslint.

Is you file called .eslintrc.js?

@jmls
Copy link

jmls commented Jun 12, 2016

I have a file called .eslintrc.json

either way, it's not an issue . I can nuke it and replace with whatever is needed

@MiguelCastillo
Copy link
Owner

Gotcha. For testing purposes, can you rename your file to .eslintrc to see if interactive linter picks it up?

@rvarbanov
Copy link
Author

I am also using .eslintrc.json.

@MiguelCastillo
Copy link
Owner

@rvarbanov yup - you are also using what is on the master branch for this to work, correct?

@rvarbanov
Copy link
Author

rvarbanov commented Jun 14, 2016

I believe I am, but I will have to double check later.

@rvarbanov
Copy link
Author

Yes, I am using what is on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants