Git Product home page Git Product logo

fast-eslint's People

Contributors

arnaud-dezandee avatar bsyk avatar dependabot[bot] avatar greenkeeperio-bot avatar semantic-release-bot avatar

Stargazers

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

Watchers

 avatar

Forkers

digitalfiz bsyk

fast-eslint's Issues

Failed to activate the fast-eslint package

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.7.3
System: Mac OS X 10.11.5
Thrown From: fast-eslint package, v2.11.0

Stack Trace

Failed to activate the fast-eslint package

At Cannot find module 'lodash.uniq'

Error: Cannot find module 'lodash.uniq'
    at Module._resolveFilename (module.js:338:15)
    at Function.Module._resolveFilename (/opt/homebrew-cask/Caskroom/atom/1.6.0/Atom.app/Contents/Resources/app.asar/src/module-cache.js:383:52)
    at Function.Module._load (module.js:289:25)
    at Module.require (module.js:366:17)
    at require (/opt/homebrew-cask/Caskroom/atom/1.6.0/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27)
    at Object.<anonymous> (/Users/jonmadi/.atom/packages/fast-eslint/lib/exec.js:7:28)
    at Module._compile (/opt/homebrew-cask/Caskroom/atom/1.6.0/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .js] (/opt/homebrew-cask/Caskroom/atom/1.6.0/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:208:21)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Module.require (module.js:366:17)
    at require (/opt/homebrew-cask/Caskroom/atom/1.6.0/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27)
    at Object.<anonymous> (/Users/jonmadi/.atom/packages/fast-eslint/lib/index.js:9:15)
    at Module._compile (/opt/homebrew-cask/Caskroom/atom/1.6.0/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .js] (/opt/homebrew-cask/Caskroom/atom/1.6.0/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:208:21)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Module.require (module.js:366:17)
    at require (/opt/homebrew-cask/Caskroom/atom/1.6.0/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27)
    at Package.module.exports.Package.requireMainModule (/opt/homebrew-cask/Caskroom/atom/1.6.0/Atom.app/Contents/Resources/app.asar/src/package.js:715:27)
    at Package.module.exports.Package.activateNow (/opt/homebrew-cask/Caskroom/atom/1.6.0/Atom.app/Contents/Resources/app.asar/src/package.js:173:16)
    at /opt/homebrew-cask/Caskroom/atom/1.6.0/Atom.app/Contents/Resources/app.asar/src/package.js:156:32
    at Package.module.exports.Package.measure (/opt/homebrew-cask/Caskroom/atom/1.6.0/Atom.app/Contents/Resources/app.asar/src/package.js:92:15)
    at /opt/homebrew-cask/Caskroom/atom/1.6.0/Atom.app/Contents/Resources/app.asar/src/package.js:149:26
    at Package.module.exports.Package.activate (/opt/homebrew-cask/Caskroom/atom/1.6.0/Atom.app/Contents/Resources/app.asar/src/package.js:146:34)
    at PackageManager.module.exports.PackageManager.activatePackage (/opt/homebrew-cask/Caskroom/atom/1.6.0/Atom.app/Contents/Resources/app.asar/src/package-manager.js:538:21)
    at /opt/homebrew-cask/Caskroom/atom/1.6.0/Atom.app/Contents/Resources/app.asar/src/package-manager.js:519:29
    at Config.module.exports.Config.transactAsync (/opt/homebrew-cask/Caskroom/atom/1.6.0/Atom.app/Contents/Resources/app.asar/src/config.js:337:18)
    at PackageManager.module.exports.PackageManager.activatePackages (/opt/homebrew-cask/Caskroom/atom/1.6.0/Atom.app/Contents/Resources/app.asar/src/package-manager.js:514:19)
    at PackageManager.module.exports.PackageManager.activate (/opt/homebrew-cask/Caskroom/atom/1.6.0/Atom.app/Contents/Resources/app.asar/src/package-manager.js:497:46)

Commands

Config

{
  "core": {
    "themes": [
      "one-light-ui",
      "chester-atom-syntax"
    ]
  }
}

Installed Packages

# User
atom-html-preview, v0.1.19
atomic-chrome, v0.3.0
chester-atom-syntax, v0.1.1
fast-eslint, v2.11.0
file-icons, v1.7.11
linter, v1.11.4
node-debugger, v1.7.0

# Dev
No dev packages

TypeError: Cannot read property 'messages' of undefined

screen shot 2016-08-14 at 6 24 27 am

Occurs under package version 3.0.0. To reproduce create an .eslintrc.js file with the following contents and attempt to save or modify:

module.exports = {
  env: {
    es6: true,
    node: true
  },
  extends: 'eslint:recommended',
  parserOptions: {
    ecmaVersion: 7,
    sourceType: 'module',
    ecmaFeatures: {
      jsx: true,
      experimentalObjectRestSpread: true,
    }
  },
  plugins: [
    'react'
  ],
  rules: {}
}

Despite the message linting continues to function as expected.

Uncaught Error: Cannot find module 'eslint-config-standa'Referenced from:

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.40.1 x64
Electron: 3.1.10
OS: DESKTOP-JDMKS56
Thrown From: fast-eslint package 4.11.0

Stack Trace

Uncaught Error: Cannot find module 'eslint-config-standa'
Referenced from:

At C:\Users\AC2Return\.atom\packages\fast-eslint\node_modules\eslint\lib\config\config-file.js:463

Error: Cannot find module 'eslint-config-standa'
Referenced from: 
    at ModuleResolver.resolve (/packages/fast-eslint/node_modules/eslint/lib/util/module-resolver.js:72:19)
    at resolve (/packages/fast-eslint/node_modules/eslint/lib/config/config-file.js:507:28)
    at load (/packages/fast-eslint/node_modules/eslint/lib/config/config-file.js:579:26)
    at configExtends.reduceRight (/packages/fast-eslint/node_modules/eslint/lib/config/config-file.js:453:36)
    at Array.reduceRight (<anonymous>)
    at applyExtends (/packages/fast-eslint/node_modules/eslint/lib/config/config-file.js:431:26)
    at Object.loadObject (/packages/fast-eslint/node_modules/eslint/lib/config/config-file.js:566:35)
    at /packages/fast-eslint/node_modules/eslint/lib/config.js:85:46)
    at /packages/fast-eslint/node_modules/eslint/lib/cli-engine.js:466:23)
    at /packages/fast-eslint/lib/exec.js:64:14
    at exports.allowUnsafeNewFunction (/packages/fast-eslint/node_modules/loophole/lib/loophole.js:25:14)
    at initEngine (/packages/fast-eslint/lib/exec.js:63:3)
    at /packages/fast-eslint/lib/index.js:19:92
    at onDidChangeKeyPath.e (~/AppData/Local/atom/app-1.40.1/resources/app/static/<embedded>:11:334305)
    at emitter.on (~/AppData/Local/atom/app-1.40.1/resources/app/static/<embedded>:11:334486)
    at Function.simpleDispatch (~/AppData/Local/atom/app-1.40.1/resources/app/static/<embedded>:11:1209208)
    at Emitter.emit (~/AppData/Local/atom/app-1.40.1/resources/app/static/<embedded>:11:1210649)
    at Config.emitChangeEvent (~/AppData/Local/atom/app-1.40.1/resources/app/static/<embedded>:11:336974)
    at Config.setRawValue (~/AppData/Local/atom/app-1.40.1/resources/app/static/<embedded>:11:334214)
    at Config.set (~/AppData/Local/atom/app-1.40.1/resources/app/static/<embedded>:11:330008)
    at SettingsPanel.set (~/AppData/Local/atom/app-1.40.1/resources/app/static/<embedded>:14:2586610)
    at ~/AppData/Local/atom/app-1.40.1/resources/app/static/<embedded>:14:2588254
    at Function.simpleDispatch (~/AppData/Local/atom/app-1.40.1/resources/app/static/<embedded>:11:1209208)
    at Emitter.emit (~/AppData/Local/atom/app-1.40.1/resources/app/static/<embedded>:11:1210649)
    at TextBuffer.emitDidStopChangingEvent (~/AppData/Local/atom/app-1.40.1/resources/app/static/<embedded>:11:504867)
    at later (~/AppData/Local/atom/app-1.40.1/resources/app/static/<embedded>:14:104393)

Commands

  2x -4:06.2.0 schelp-syntax:toggle (input.hidden-input)
     -2:20.5.0 atom-eslint-fix:run (input.hidden-input)
     -1:50.6.0 core:backspace (input.hidden-input)
  6x -1:47.8.0 core:move-right (input.hidden-input)
     -1:42.3.0 core:backspace (input.hidden-input)
     -1:22.4.0 textlint-auto-fixer:fix-current-file (button.btn.btn-primary)

Non-Core Packages

atom-material-syntax 1.0.8 
busy-signal 2.0.1 
eslint-fixer 1.3.0 
eslint-format 0.4.7 
fast-eslint 4.11.0 
intentions 1.1.5 
jade-beautify 0.1.5 
linter 2.3.1 
linter-eslint 8.5.5 
linter-ui-default 1.8.0 
ruby-syntax-replacer 0.5.1 
schelp-syntax 0.6.3 
syntax-theme-auto-changer 0.9.4 
textlint-auto-fixer 0.2.0 

Installing fast-eslint causes crash on opening js file

Opening any Javascript file is now causing an issue. Everything was working until I upgraded to the current fast-eslint version.

My .eslintrc:

{
  "parser": "babel-eslint",

  "env": {
      "browser": true,
      "node": true,
      "es6": true
  },

  "rules": {
    // needed for eslint
    "strict": 0,

    // react stuff
    "react/jsx-boolean-value": 1,
    "react/jsx-no-undef": 2,
    "react/jsx-uses-react": 2,
    "react/jsx-uses-vars": 1,
    "react/no-did-mount-set-state": 1,
    "react/no-did-update-set-state": 1,
    "react/no-unknown-property": 1,
    "react/react-in-jsx-scope": 1,
    "react/self-closing-comp": 1,
    "react/wrap-multilines": 1
  },

  "ecmaFeatures": {
        "jsx": true,
        "modules": true
  },

  "plugins": [
    "react"
  ]
}

"Import is reserved" Error

Just installed the package and opened a Javascript ES6 file that uses imports.
Alas:

image

Maybe I misunderstood, do I have to configure anything before this package actually uses the "bundled" airbnb config (which I understood already supports ES6)?

Cheers

This error

The validator seems to fail when trying to validate code with a 'this' expression.

Update dependencies

Currently the version of eslint specified in package.json is 4.19.1 while the latest version of eslint is 5.15.3.

This is producing errors.
e.g) "array-element-newline": "consistent" option is excluded and making "fatal: Error" :-(

Cannot read config file for Airbnb preset

Hello !
I have update my fast-eslint version, and now everything broke.

Error: Cannot read config file: /Users/iryusa/.atom/packages/fast-eslint/node_modules/eslint-config-airbnb/node_modules/eslint-config-airbnb-base/rules/strict.js Error: ENOENT: no such file or directory, open '/Users/iryusa/.atom/packages/fast-eslint/node_modules/eslint-config-airbnb/node_modules/eslint-config-airbnb-base/rules/strict.js' Referenced from: airbnb Referenced from: /Users/iryusa/Workspace/mjml/.eslintrc

I guess this is because how npm 3 handles dependencies ? Can you take a look please ? :)

➜  node_modules node -v
v4.2.2
➜  node_modules npm -v
3.8.8
➜  node_modules pwd
/Users/iryusa/.atom/packages/fast-eslint/node_modules
➜  node_modules ls -l
total 0
drwxr-xr-x  17 iryusa  staff  578 16 mai 15:46 atom-linter
drwxr-xr-x  11 iryusa  staff  374 16 mai 15:46 atom-package-deps
drwxr-xr-x   8 iryusa  staff  272 16 mai 15:46 babel-eslint
drwxr-xr-x  11 iryusa  staff  374 16 mai 15:46 eslint
drwxr-xr-x  11 iryusa  staff  374 16 mai 15:46 eslint-config-airbnb
drwxr-xr-x  10 iryusa  staff  340 16 mai 15:46 eslint-config-airbnb-base
drwxr-xr-x   7 iryusa  staff  238 16 mai 15:46 eslint-config-google
drwxr-xr-x  10 iryusa  staff  340 16 mai 15:46 eslint-config-standard
drwxr-xr-x   9 iryusa  staff  306 16 mai 15:46 eslint-config-standard-jsx
drwxr-xr-x   8 iryusa  staff  272 16 mai 15:46 eslint-config-xo
drwxr-xr-x  10 iryusa  staff  340 16 mai 15:46 eslint-plugin-babel
drwxr-xr-x  10 iryusa  staff  340 16 mai 15:46 eslint-plugin-import
drwxr-xr-x  16 iryusa  staff  544 16 mai 15:46 eslint-plugin-jsx-a11y
drwxr-xr-x   9 iryusa  staff  306 16 mai 15:46 eslint-plugin-promise
drwxr-xr-x   7 iryusa  staff  238 16 mai 15:46 eslint-plugin-react
drwxr-xr-x  10 iryusa  staff  340 16 mai 15:46 eslint-plugin-standard
drwxr-xr-x   7 iryusa  staff  238 16 mai 15:46 lodash.uniq
drwxr-xr-x   6 iryusa  staff  204 16 mai 15:46 loophole

Unexpected top-level property "ecmaFeatures"

With the recent update I am getting the following error on our project.
Error: [object Object]: ESLint configuration is invalid: - Unexpected top-level property "ecmaFeatures".

Do you have any hint ? :)

Upgrading to 2.3.0 produces errors with old config.

And I get a whole load of errors along the lines of:

/Users/thaggie/.atom/packages/fast-eslint/node_modules/eslint/conf/eslint.json:
Configuration for rule "no-alert" is invalid: Severity should be one of the following: 0 = off, 1 = warning, 2 = error (you passed "off").

Referenced from: /Users/thaggie/dev/data-play/.eslintrc.js

I've edited the file by hand following the instructions.

jQuery environment

Tried adding jquery to the environment ("jquery ": true) but received an error "Environment key "jquery" is unknown". jQuery environment is declared as available at ESLint.org so I don't know what is an issue here exactly

Cant use with eslint-import-resolver-webpack

I use webpack for my project and have aliases for directories in my webpack config. So, when I add

  "settings": {
    "import/resolver": "webpack"
  }

to my .eslintrc Atom hightlights all imports and says "Resolve error: unable to load resolver webpack". However cli version of eslint works as expected

fast-eslint trow errors when no configuration files are found

An option allowing fast-eslint to not activate himself when no .eslintrc file is found in the project folder would be great.

For exemple, downloading and exploring a package from the web in atom trow error at each opening of a javascript file. Pretty annoying…

Even if this package is a great tool and serve is purpose more than nicely in a everyday workflow, this behavior make him a 'disable-right-away' kind of extension to me.

regards.

Question. Setup is not pretty clear.

Hi!

I can't fully figure out the installation process. As far as I've got I should at least apm install fast-eslint.

After that was done I've got somehow working linter. But that was when I worked in a directory with a .eslintrc.* with defined extends: airbnb-base and other plugins and ESlint installed locally. But even then I wasn't sure if fast-eslint was using config specified in the .eslintrc.*.

After that I went to another dir with no npm-packages and configs installed (clear directory with only text files) and restart Atom. And in that case the fast-eslint plugin didn't work (I guess it couldn't get a config file).

At that point my question is what are certain steps to get this plugin work from any place in my system?

  • Should I mandatory install a shared config globally?
  • Should I mandatory install globally the ESlint package and other packages the shared config depends on?
  • Should I mandatory create .eslintrc.* in my home or other directories?
  • Should I mandatory configure my Atom via Atom -> Config... specifying baseConfigExtends property?

Is it all mandatory or something is optional?

And one more thing - how can I make sure the fast-eslint is using a right config?

Thank you!

fast-eslint cannot to find the required module if `node_modules` isn't in the top-level directory.

To reproduce the problem, just create a subdirectory, and create a project with npm, and installed every eslint dependencies.

$ mkdir -p ~/a/b
$ npm init -y
$ npm i -D eslint \
        eslint-config-airbnb \
        eslint-plugin-import \
        eslint-plugin-jsx-a11y \
        eslint-plugin-react
$ touch index.js
$ touch .eslintrc

Then put some rules inside the .eslintrc, such as:

{
  "extends": "airbnb",
  "rules": {
    "max-len": [1, 120, 2, {
      "ignoreComments": true
    }],
    "no-param-reassign": 0,
    "no-console": 0,
  }
}

Let's try run atom in the directory ~/a/b,

~/a/b $ atom .

Type something in index.js to verify the eslint is working.

Now, let's try run atom in the directory ~/a

~/a/b $ cd ..
~/a $ atom .

Then type something in index.js, we got many errors about cannot find the modules.

Error: Cannot find module 'eslint-config-airbnb' Referenced from: /Users/taowang/a/b/.eslintrc
Error: Cannot find module 'eslint-config-airbnb'
Referenced from: /Users/taowang/a/b/.eslintrc
    at Object.ModuleResolver.resolve (/Users/taowang/.atom/packages/fast-eslint/node_modules/eslint/lib/util/module-resolver.js:75:19)
    at resolve (/Users/taowang/.atom/packages/fast-eslint/node_modules/eslint/lib/config/config-file.js:479:33)
    at load (/Users/taowang/.atom/packages/fast-eslint/node_modules/eslint/lib/config/config-file.js:496:24)
    at /Users/taowang/.atom/packages/fast-eslint/node_modules/eslint/lib/config/config-file.js:392:36
    at Array.reduceRight (native)
    at applyExtends (/Users/taowang/.atom/packages/fast-eslint/node_modules/eslint/lib/config/config-file.js:363:28)
    at Object.load (/Users/taowang/.atom/packages/fast-eslint/node_modules/eslint/lib/config/config-file.js:530:22)
    at loadConfig (/Users/taowang/.atom/packages/fast-eslint/node_modules/eslint/lib/config.js:64:33)
    at getLocalConfig (/Users/taowang/.atom/packages/fast-eslint/node_modules/eslint/lib/config.js:136:23)
    at Config.getConfig (/Users/taowang/.atom/packages/fast-eslint/node_modules/eslint/lib/config.js:263:22)
    at processText (/Users/taowang/.atom/packages/fast-eslint/node_modules/eslint/lib/cli-engine.js:231:27)
    at CLIEngine.executeOnText (/Users/taowang/.atom/packages/fast-eslint/node_modules/eslint/lib/cli-engine.js:761:26)
    at /Users/taowang/.atom/packages/fast-eslint/lib/exec.js:73:24
    at exports.allowUnsafeNewFunction (/Users/taowang/.atom/packages/fast-eslint/node_modules/loophole/lib/loophole.js:25:14)
    at /Users/taowang/.atom/packages/fast-eslint/lib/exec.js:72:7
    at exec (/Users/taowang/.atom/packages/fast-eslint/lib/exec.js:69:10)
    at Object.lint (/Users/taowang/.atom/packages/fast-eslint/lib/index.js:48:16)
    at promises.push.Promise.then._this.emitter.emit.linter (/Users/taowang/.atom/packages/linter/lib/linter-registry.js:63:26)
    at /Users/taowang/.atom/packages/linter/lib/linter-registry.js:62:23
    at Set.forEach (native)
    at LinterRegistry.lint (/Users/taowang/.atom/packages/linter/lib/linter-registry.js:60:18)
    at /Users/taowang/.atom/packages/linter/lib/linter.coffee:98:16
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
    at /Users/taowang/.atom/packages/linter/lib/editor-linter.js:86:22
    at /Users/taowang/.atom/packages/linter/lib/helpers.coffee:25:18

.eslintignore is not read

I have an .eslintignore in my project root folder, and when I open files that belongs in the ignore path, fast-eslint go ahead and performed lint regardless.

The plugin seems to accept the configuration in my .eslintrc file without a problem. So, I'm wondering if I'm missing some kind of configuration

Fix often 'fixes' in the wrong place

The Fix button available if you hover over some style issues often applies its fix to a different line of code.

For example, if I hover over an object-curly-spacing issue and click the Fix button a space will be inserted at the end of the nearest comment instead of after the curly bracket. Just one of example of some very flaky Fix logic.

Not sure it is relevant but I am using airbnb-base config with the exception that I use semi: ["error", "never"].

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.