Git Product home page Git Product logo

ember-cli-eslint's Introduction

ember-cli-eslint

Latest NPM release TravisCI Build Status Ember Observer Score

ESLint for Ember CLI apps and addons.

๐Ÿ”ด DEPRECATED ๐Ÿ”ด

Please use ESLint directly instead.

More info / background:

Installation

ESLint 4 (for Node 4 and above):

ember install ember-cli-eslint@4

ESLint 3 (for Node 4 and above):

ember install ember-cli-eslint@3

ESLint 2 (for Node 0.10 and above):

ember install ember-cli-eslint@2

After installation, an .eslintrc.js file will be placed in both the root of your project and the /tests directory.

Furthermore, a .eslintignore file can be used to exclude files from linting while the linter is running. Its syntax is identical to .gitignore files.

Disabling JSHint

Congratulations! You've made the leap into the next generation of JavaScript linting. At the moment, however, ember-cli defaults to generating applications and addons with a jshint configuration.

If you notice the two awkwardly running side by side, click here!

ember-cli >= 2.5.0

As of ember-cli v.2.5.0, jshint is provided through its own ember-cli-jshint addon. Running npm uninstall --save-dev ember-cli-jshint, in addition to removing any .jshintrc files from your project should guarantee that its behavior is disabled.

ember-cli < 2.5.0

Controlling linting is a bit trickier on versions of ember-cli prior to 2.5.0. Within your ember-cli-build.js file, ember-cli-qunit or ember-cli-mocha can be configured to have their default linting process disabled during:

module.exports = function(defaults) {
  const app = new EmberApp(defaults, {
    'ember-cli-qunit': {
      useLintTree: false
    }
  });
};

or

module.exports = function(defaults) {
  const app = new EmberApp(defaults, {
    'ember-cli-mocha': {
      useLintTree: false
    }
  });
};

Alongside this setting, the hinting property can then be used to enable/disable globally:

const isTesting = process.env.EMBER_ENV === 'test';

module.exports = function(defaults) {
  const app = new EmberApp(defaults, {
    hinting: !isTesting,
  });
};

Usage

ESLint will be run by ember-cli-qunit or ember-cli-mocha automatically when you run ember test. If ESLint is not being run automatically, try updating your ember-cli and/or ember-cli-qunit/ember-cli-mocha dependencies.

Configuration

ember-cli-eslint can be configured through the eslint key in your ember-cli-build.js file:

let app = new EmberApp(defaults, {
  eslint: {
    testGenerator: 'qunit',
    group: true,
    rulesDir: 'eslint-rules',
    extensions: ['js'],
  }
});
  • testGenerator is automatically detected if ember-qunit/ember-cli-qunit or ember-mocha/ember-cli-mocha are used, but can also be set to qunit and mocha manually.

  • group can be set to false to go back to the previous behavior where every generated test was contained in its own separate module.

  • rulesDir is the name of the directory for your custom eslint rules. It defaults to eslint-rules.

  • extensions is an array containing the file extensions to lint. If you want to lint JavaScript and TypeScript files for example it should be set to ['js', 'ts']. NOTE: If you add Typescript files @typescript-eslint/parser has to be installed and specified as the parser. For more information take a look at the @typescript-eslint/parser

On Build Files

Please note that if you are using this to lint files which are part of the build process (ie. index.js, ember-cli-build.js, config/), whether in an application or as part of an addon, they will not be linted. It is recommended that eslint is setup separately to lint these files and can be setup as an npm script and run as part of a CI process.

Contributing

Installation

  • git clone this repository
  • cd ember-cli-eslint
  • npm install
  • bower install

Running

Running Tests

  • npm test (Runs ember try:testall to test your addon against multiple Ember versions)
  • ember test
  • ember test --server
  • ember try:each

Linting

  • npm run lint:hbs
  • npm run lint:js
  • npm run lint:js -- --fix

Running the dummy application

For more information on using ember-cli, visit https://ember-cli.com/.

License

This project is licensed under the MIT License.

ember-cli-eslint's People

Contributors

alexlafroscia avatar bmish avatar bobisjan avatar chrisgame avatar cibernox avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar dmzza avatar elwayman02 avatar ember-tomster avatar gaurav0 avatar greenkeeper[bot] avatar greenkeeperio-bot avatar jeffjewiss avatar jonathankingston avatar kategengler avatar loganrosen avatar mitchlloyd avatar mmun avatar morhook avatar nickiaconis avatar ro0gr avatar rwjblue avatar stefanpenner avatar t-sauer avatar tamzinblake avatar teddyzeenny avatar turbo87 avatar uturista avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ember-cli-eslint's Issues

Version bump in broccoli-lint-eslint breaking apps

There's a currently know problem eslint/eslint#5476 bumping the eslint version to 2.3.0 is breaking our apps that use babel-eslint as a parser, I tried to fork these repos and fix the version to 2.2.0 while a fix is published but I failed miserably. Any pointers would be much appreciated.

Tests fail with transpilation errors

After getting back on the latest master, I've noticed that tests now fail with what appear to be transpilation errors:

not ok 1 PhantomJS 2.1 - Global error: ReferenceError: Can't find variable: exports at http://localhost:7357/assets/vendor.js, line 65242
    ---
        Log: |
            { type: 'error',
              text: 'ReferenceError: Can\'t find variable: exports at http://localhost:7357/assets/vendor.js, line 65242\n' }
    ...
not ok 2 PhantomJS 2.1 - Global error: ReferenceError: Can't find variable: exports at http://localhost:7357/assets/test-support.js, line 6240
    ---
        Log: |
            { type: 'error',
              text: 'ReferenceError: Can\'t find variable: exports at http://localhost:7357/assets/test-support.js, line 6240\n' }
    ...
not ok 3 PhantomJS 2.1 - Global error: ReferenceError: Can't find variable: exports at http://localhost:7357/assets/dummy.js, line 11
    ---
        Log: |
            { type: 'error',
              text: 'ReferenceError: Can\'t find variable: exports at http://localhost:7357/assets/dummy.js, line 11\n' }
    ...
not ok 4 PhantomJS 2.1 - Global error: SyntaxError: Use of reserved word 'import' at http://localhost:7357/assets/tests.js, line 25
    ---
        Log: |
            { type: 'error',
              text: 'SyntaxError: Use of reserved word \'import\' at http://localhost:7357/assets/tests.js, line 25\n' }
    ...

Jumping back to my branch where I committed #33, everything runs okay, so I'm trying to pinpoint what the differences might be -- but to no avail yet.

Disable jshint

Probably more a question, but after googling around without luck...
Is there a way to disable only the jshint tests?

var app = EmberApp({
  'hinting': false
})

Seems to disable both, jshint and jslint.

Maybe this belongs more into ember-cli, I'm not sure.

Adding .eslintrc to tests dir leads to confusing results

Because of the way rules cascade in eslint, the .eslintrc file in the tests dir will completely overrule the rules in the .eslintrc file at the project root. This leads to very confusing results when linting you project. I would recommend not creating the .eslintrc file in the tests directory and let people deal with uses of console in their tests themselves.

addons are eslinted when imported

in my case we are extending the ember-rapid-forms components to be compatible with foundation.
when running ember serve initially or ember test with the generator in the readme.

I've tried using // eslint-disable-line at the end of the import lines, but the imported modules are still linted (and the imports of those modules).

Is there a workaround to disable linting of certain imports?

Is there a way you could not lint files that were part of an addon?

git tags missing / inconsistent naming

According to NPM the current version of this project is 1.2.1 but the repo only shows 1.1.0 as the latest release. It would be a good idea to keep the tags here in sync with NPM releases.

Consider removing babel-eslint from coding-standard

I would like to extend from coding-standard/ember-application.js, but I'm not using the babel-eslint parser. The default espree parser works just fine with default ember-cli apps. I tried overriding as parser: 'espree', but I'm still getting Error: Cannot find module 'babel-eslint' in the console because I have eslint installed in my package.json but not babel-eslint.

eslint-config-ember not found

After installation I get this error

Error: Cannot read config package: eslint-config-ember Error: Cannot find module 'eslint-config-ember' 

Not sure what's up there.

Fix addon installing

When installing into an addon the linting file isn't generated in the dummy test location. Latest ember seems to not like addon installs anyway.

Add separate eslint config for tests

Tests have different globals and helper functions, it would be handy if ember-cli-eslint would behave similar to default ember-cli jshint with a seperate eslint config as tests/.eslintrc

dated `eslint-config-ember` installed

Following seen after ember install ember-cli-eslint by instruction

    "eslint-config-ember": "0.0.5"

Related to jonathanKingston/eslint-config-nightmare-mode#1 it worked as desired after npm install --save-dev eslint-config-ember updating. It became

    "eslint-config-ember": "^0.2.0"

I think it would look better if it's done after ember install ember-cli-eslint itself. Thank you for nice ember eslint dependency by the way.

uninstall ember-cli-jshint and install ember-cli-eslint cause an error

from http://stackoverflow.com/q/37931556/1115187

I want to use eslint instead of jshint in ember app. So, I just follow instructions from ember-cli-eslint github page, and run this two commands:

npm uninstall --save-dev ember-cli-jshint
ember install ember-cli-eslint

And!!!! my project turns into a pumpkin: no one ember command doesn't work, throwing an error:

Error: Cannot find module 'ember-try-config'
at Function.Module._resolveFilename (module.js:339:15)
at Function.Module._load (module.js:290:25)
at Module.require (module.js:367:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/home/user/projects/ember-demo/node_modules/ember-cli/node_modules/ember-try/lib/utils/config.js:7:34)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)

Here is my environment:

host@user $ ember --version
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
ember-cli: 2.6.2
node: 5.11.1
os: linux x64

And I am working around out of the box project, just created with ember new demo-ember

UPD: if you will skip the uninstall step - you won't get a pumpkin)) in this case ember continues to work as expected, but I still couldn't use eslint as a linter tool.

ember build fails because of out of date dependencies

The version of eslint referenced by the broccoli-lint-eslint dependency is out of date and doesn't support the .eslintrc settings of the dependent eslint-config-nightmare-mode package. Updating to the latest broccoli-lint-eslint should fix the problem.

Error: Cannot find module 'eslint-config-ember'

I have a standard ember-cli app and installed ember-cli-eslint with ember install ember-cli-eslint. My .eslintrc contains the following:

{
    "parser": "babel-eslint",
    "extends": "ember"
}

But when I run eslint app/adapters/application.js I get the following error:

/Users/nicolas/.nvm/versions/node/v4.0.0/lib/node_modules/eslint/lib/config.js:209
                    throw e;
                    ^

Error: Cannot find module 'eslint-config-ember'
Referenced from: /Users/nicolas/development/dkz_website/.eslintrc
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:286:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at readConfigFromFile (/Users/nicolas/.nvm/versions/node/v4.0.0/lib/node_modules/eslint/lib/config.js:151:44)
    at loadConfig (/Users/nicolas/.nvm/versions/node/v4.0.0/lib/node_modules/eslint/lib/config.js:172:22)
    at /Users/nicolas/.nvm/versions/node/v4.0.0/lib/node_modules/eslint/lib/config.js:203:46
    at Array.reduceRight (native)
    at loadConfig (/Users/nicolas/.nvm/versions/node/v4.0.0/lib/node_modules/eslint/lib/config.js:187:36)
    at getLocalConfig (/Users/nicolas/.nvm/versions/node/v4.0.0/lib/node_modules/eslint/lib/config.js:317:23)

I'm using the following versions:
ember-cli: 1.13.8
ember-cli-eslint: 1.2.1
node: 4.0.0
npm: 2.13.4
os: darwin x64

Thanks for your help.

Minimum builderFeatures required error

I installed ember-cli-eslint on an existing proyect, when I try to ember server or ember run, I get this error message:
Minimum builderFeatures required: { persistentOutputFlag: true }

Any clue as to why this is happening? I can't seem to find any information on this.

.eslintignore file is ignored

I have a script folder inside my ember cli project. I dont want to eslint this script folder because it is just quick&dirty try-out code of prototype-ideas. Now I put a .eslintignore file into my project root, right next to .eslintrc.

But the folder is still linted... what am I doing wrong?

Thanks

`testGenerator` in index.js is still empty in 1.2.1

I have "ember-cli-eslint": "1.2.1" in my package.json, but when I installed with npm install, the index.js in the packages still be the old version.

'use strict';
var eslint = require('broccoli-lint-eslint');

module.exports = {
  name: 'ember-cli-eslint',
  included: function (app) {
    this._super.included(app);
    this.jshintrc = app.options.jshintrc;
    this.options = app.options.eslint || {};
  },
  lintTree: function(type, tree) {
    return eslint(tree, {
      testGenerator: this.options.testGenerator || generateEmptyTest
    });
  }
};

// Empty test generator. The reason we do that is that `lintTree`
// will merge the returned tree with the `tests` directory anyway,
// so we minimize the damage by returning empty files instead of
// duplicating app tree.
function generateEmptyTest() {
  return '';
}

Any body knows why I always got the old one instead of 87761c7? Has the new release already been published on npm?

Write tests!

This should block all issues, as urgently we need tests.

Slow initial build

The build is really really slow since we included this:

Slowest Trees                                 | Total
----------------------------------------------+---------------------
EslintValidationFilter                        | 31237ms
EslintValidationFilter                        | 11729ms

Ignored files fail `ember test`

I have some files that I want to ignore, and have ignored them using an .eslintrc file. However, the fact that they are ignored raises an error, which then fails the ember test run. Would it be possible to prevent these warning from failing the build? I feel like, if the user has explicitly listed the files they want to ignore, then even these warnings should be ignored.

Other maintainer wanted

I haven't used Ember for the last 8 or so months, which means that I'm taking a lot of my free time to manage changes on projects like this.

I would like a keen maintainer who can work in times when I am busy.

Apply here.

ember test is not reading .eslintignore?

I have an .eslintignore file in the root of my project. It contains:

/tests/reports/*

The goal of this is to get all the istanbul reports ignored. If I just run eslint this works, but if I run ember test the .eslintignore file is not respected. Additionally I have tired added a tests/.eslintignore file but it too appears to be ignored when running test. I don't think its a problem with my syntax since running eslint manually respects the .eslintignore file.

New version?

It seems like a lot of work has been done on this module since the last published version (1.2.1) quite time ago, is there any plans to publish a new version of this module?

Automatically uninstall JSHint

Would uninstalling the JSHint addon and removing the config files after installation be desirable? I noticed that ember-cli-mocha removed QUnit automatically, which is pretty nice... It would be nice to do the same in cleaning up the JSHint stuff, assuming one wouldn't want both installed on their machine.

I'm happy to implement this if it's something people agree we should do.

Only fails on modified files

I'm seeing some pretty weird behavior, and I'm not sure where in the pipeline the issue is.

I've been working on porting Ember Suave's rules over to ESLint, and so have installed ember-cli-eslint on a fresh Ember app as well as my ESLint plugin. After running ember test it shows that all of the tests, even when the tests should fail.

If I go into one of the files that should fail, app/app.js for example, and modify it in any way, the test now fails the way I expect it to. It's like the passing test is being cached for some reason. I've trying nuking the dist and tmp directories, but that didn't help at all. Is there somewhere else where these results might be cached?

I do know that ESLint can cache results which sounds like the behavior that I'm experiencing, but I can't find a .eslintcache directory anywhere.

ember install ember-cli-eslint fails

When trying to install ember-cli-eslint with:

ember install ember-cli-eslint

The install fails with:

Install failed. Could not find addon with name: ember-cli-eslint

an npm install of ember-cli-eslint does work however. And after that the ember install works as well (and generates the eslintrc files in root and tests). I don't know if that's the intended behaviour, but I couldn't find it in the readme.

"npm install" fails

I'm seeing the following error when I try to run npm install from the project folder:

npm ERR! No compatible version found: eslint-config-ember@^0.1.1
npm ERR! Valid install targets:
npm ERR! 0.2.0, 0.1.0, 0.0.5, 0.0.4, 0.0.3, 0.0.2, 0.0.1

Unexpected token issue

Our testing framework started breaking with this message today from ember-cli-eslint. Was anything pushed to 1.2.1 that is causing this?

screen shot 2016-03-09 at 3 52 10 pm

QUnit tests fail on warnings

When setting rules to warn ("1") any offending lines count as failed tests when running "ember test". I tend to think that warnings should count as passing results when running tests in ember.

For me warnings are useful when running linters in text editors, providing suggestions to devs that aren't necessarily enforced, but considered good practice. Their usefulness while running tests in ember is debatable, but it would be nice to at least have the option to count them as passing rather than failing results.

Currently, I have to either relax all warning rules to ignore rules to pass tests and deploy my product or fix a couple hundred lines of code that have warnings. Thoughts?

Support StandardJS

http://standardjs.com/ is becoming a big thing and it would be great if using it in Ember was straightforward.

I tried installing eslint-config-standard and updating .jshintrc to have "extends": "standard".

It works, but it crashes due to this issue: babel/babel-eslint#316.

TypeError: Cannot read property 'value' of undefined
at getStarToken (/home/lolmaus/Code/launchpad2/node_modules/ember-cli-eslint/node_modules/broccoli-lint-eslint/node_modules/eslint/lib/rules/generator-star-spacing.js:68:25)

It's using eslint/lib/rules/generator-star-spacing.js but StandardJS needs eslint-plugin-babel/rules/generator-star-spacing.js.

I wasn't able to figure out how to tell ember-cli-eslint to use that.

Ember CLI Deploy Failing on Windows Due to ESLint

When running ember deploy, I'm seeing the following error:

Invalid regular expression: /(\)?build(\)?$/: Unterminated group
SyntaxError: Invalid regular expression: /(\)?build(\)?$/: Unterminated group
    at new RegExp (native)
    at Object.<anonymous> (C:\projects\app-business\node_modules\broccoli-lint-eslint\build\index.js:10:23)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:16:19)
    at Object.<anonymous> (C:\projects\app-business\node_modules\ember-cli-eslint\index.js:2:14)
    at Module._compile (module.js:413:34)

Is there a way to disable linting at this stage?

Thanks!

Support ESLint 2

It look like problem with supporting eslint@^2.0.0. Can we up eslint version?

Qunit env doesn't work

When using the new eslint qunit env from eslint 0.24.1, as described in globals, ember-cli-eslint fails with:

Cannot read property 'ecmaFeatures' of undefined
TypeError: Cannot read property 'ecmaFeatures' of undefined
    at /Users/ismay/Projects/my_project/node_modules/eslint/lib/eslint.js:366:53
    at Array.forEach (native)
    at prepareConfig (/Users/ismay/Projects/my_project/node_modules/eslint/lib/eslint.js:365:33)
    at EventEmitter.module.exports.api.verify (/Users/ismay/Projects/my_project/node_modules/eslint/lib/eslint.js:601:18)
    at processText (/Users/ismay/Projects/my_project/node_modules/eslint/lib/cli-engine.js:201:27)
    at processFile (/Users/ismay/Projects/my_project/node_modules/eslint/lib/cli-engine.js:226:12)
    at /Users/ismay/Projects/my_project/node_modules/eslint/lib/cli-engine.js:322:26
    at walk (/Users/ismay/Projects/my_project/node_modules/eslint/lib/util/traverse.js:81:9)
    at /Users/ismay/Projects/my_project/node_modules/eslint/lib/util/traverse.js:102:9
    at Array.forEach (native)
    at traverse (/Users/ismay/Projects/my_project/node_modules/eslint/lib/util/traverse.js:101:11)
    at CLIEngine.executeOnFiles (/Users/ismay/Projects/my_project/node_modules/eslint/lib/cli-engine.js:313:9)
    at EslintValidationFilter.processString (/Users/ismay/Projects/my_project/node_modules/ember-cli-eslint/node_modules/broccoli-lint-eslint/lib/index.js:105:25)
    at EslintValidationFilter.Filter.processFile (/Users/ismay/Projects/my_project/node_modules/ember-cli-eslint/node_modules/broccoli-lint-eslint/node_modules/broccoli-filter/index.js:136:31)
    at /Users/ismay/Projects/my_project/node_modules/ember-cli-eslint/node_modules/broccoli-lint-eslint/node_modules/broccoli-filter/index.js:85:21
    at lib$rsvp$$internal$$tryCatch (/Users/ismay/Projects/my_project/node_modules/ember-cli-eslint/node_modules/broccoli-lint-eslint/node_modules/broccoli-filter/node_modules/rsvp/dist/rsvp.js:489:16)
    at lib$rsvp$$internal$$invokeCallback (/Users/ismay/Projects/my_project/node_modules/ember-cli-eslint/node_modules/broccoli-lint-eslint/node_modules/broccoli-filter/node_modules/rsvp/dist/rsvp.js:501:17)
    at /Users/ismay/Projects/my_project/node_modules/ember-cli-eslint/node_modules/broccoli-lint-eslint/node_modules/broccoli-filter/node_modules/rsvp/dist/rsvp.js:1095:13
    at lib$rsvp$asap$$flush (/Users/ismay/Projects/my_project/node_modules/ember-cli-eslint/node_modules/broccoli-lint-eslint/node_modules/broccoli-filter/node_modules/rsvp/dist/rsvp.js:1290:9)
    at process._tickCallback (node.js:355:11)

This error disappears when setting

env: 
  qunit: false

Integrate eslint-friendly-formatter

It would be great to automatically run eslint using this package as a formatter, so that people can integrate their terminal with editors to easily click into a file when they see an error.

https://github.com/royriojas/eslint-friendly-formatter

All we'd need to do is update the eslint command to add --format 'node_modules/eslint-friendly-formatter' (accounting, of course, for OS differences & npm2 vs npm3).

Disabling linting for tests

Any tips on how to disable linting for tests?

I want to fix my app lint errors first, but the test lint errors drown everything out.

Rebuild application when .eslintrc is changed

Hey,

when adopting ember-cli-eslint you'll likely end up with a lot of warnings/errors and in turn you will
a) change your code a lot
b) change .eslintrc quite a bit to match your coding style/your globals/etc.

a) already rebuilds the application just fine, if you only change the .eslintrc (b)) you cannot immediately see if tests now pass. ... that would be nice though ๐Ÿ‘

Best regards,
Dominik

Ember serve fails because of test-generation

The method for generating tests outlined in the readme doesn't work with ember serve because it isn't environment specific. Thus, it tries to generate tests and import qunit when you try to access localhost:4200:

Error: Could not find module `qunit` imported from `my-project/tests/factories/item.eslint-test`

Which doesn't work because as far as I know, qunit is only available in the testing environment. I'd say test generation should be exclusive to the testing environment. I'm unsure what the best approach would be though.

Wrong configuration is being used

Somehow, I'm seeing some configuration options applied during testing that shouldn't be applied.

I have a bunch of tests failing due to the comma-dangle rule being applied.

not ok 8 PhantomJS 2.1 - ESLint - acceptance/_checkout-test.js should pass ESLint
    ---
        message: >
            acceptance/_checkout-test.js should pass ESLint.
            162:34  - Unexpected trailing comma. (comma-dangle)
            230:36  - Unexpected trailing comma. (comma-dangle)
        Log: |
    ...

However, as far as I can tell from the command line, that rule is "off".

$ eslint --print-config app | grep comma
    "comma-dangle": "off",
    "comma-spacing": "off",
    "comma-style": "off",

$ eslint --print-config tests | grep comma
    "comma-dangle": "off",
    "comma-spacing": "off",
    "comma-style": "off",

If I run eslint from the command line none of the files fail, nor to they fail from ESLint being run through my editor. That property must be turned on from somewhere, but I just can't tell where.

Rename eslint.json to .eslintrc

I'd prefer to use .eslintrc instead of eslint.json as executing eslint manually looks for .eslintrc (which is what my editor does on save).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.