Coder Social home page Coder Social logo

atom-stylefmt's Introduction

atom-stylefmt's People

Contributors

macgyver avatar masaakim 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

Watchers

 avatar  avatar  avatar  avatar

atom-stylefmt's Issues

Formatting code stops showing linter markings

Everytime I use stylefmt to format a file, it removes the underlines and line-markings made by the linter package.

You could have been lucky that it meant that all the errors/warnings were fixed, but for some reason it doesn't fix everything based on the .stylelintrc I have in the project root folder. But that is a bug-ticket for the stylefmt project, not atom-stylefmt, I believe.

It seems like the editor is "refreshed" when stylefmt has run, but it doesn't show the linter markings afterwards.
If I move the text-cursor around, I can still get the message-popup for linter, tellling me, that there are errors / warnings.

Here is shown a screenshot of the editor before running atom-stylefmt.
atom-stylefmt-linter-markings-shown

below is shown a screenshot of the editor after running atom-stylefmt.
atom-stylefmt-linter-markings-hidden

If any debugging or further info is needed, please tell me and I'll see if I can get it.

bug

border: 2px outset rgba(0, 0, 0, .9); -> border: 2px outset;

Your gif is broken!

Hey there, was happy to see a demonstration.. but suddenly.. after the context menu appears, the gif gets white in Chrome. My Atom editor just restarts it at the point where Chrome turns white.

Redo it, i can really recomment http://www.cockos.com/licecap/ for stress free gif capturing on OSX

Have a nice day and thx for your work,
Ben

Format on Save re-dirties fmted file

The Format on Save setting is nice, but if the file is changed by said formatting, the save happens first, so you end up having to save twice.

Settings from .stylelintrc?

Hello!

I have .stylelintrc in the folder (with css file) with the following rules:
{ "rules": { "max-empty-lines": 1 } }

Also installed plugin https://atom.io/packages/linter-stylelint, and it picks up my settings.

I installed your plugin and I want to format my css file with the configuration from the .stylelintrc, but this does not happen - your plugin is formatting a document on some other settings (rules). Ie in my case - the blank lines are not corrected for example, but other rules are executed, although these rules do not have in my .stylelintrc

st1


What am I doing wrong?

Thank you

Plugin enabled, not working at all

Atom 1.18.0
Stylefmt 5.0.1

None of these methods for using the plugin exist:

  • Packages > stylefmt > Format CSS
  • Context Menu > Format CSS
  • Command Palette (โŒ˜ + shift + P) > Format CSS

No console errors. No nothing. :(

Not working

Tried running it on multiple files, without any result. CLI version works fine.
Using the following stylelint config:
.stylelintrc

If .stylelintrc is not in project root folder, nothing gets formatted.

I think this is an atom-stylefmt issue, but please correct me if i'm wrong.

If I open a project folder in Atom and uses atom-stylefmt to format the code, then it won't format anything unless the .stylelintrc file is in the project root folder.

If I manually type in commandline, stylefmt [file 1] [file 2], then it will format the file according to the specified rules just fine.

I use linter-stylelint to mark errors and show error descriptions inline, and this works just fine if the .stylelintrc file is in the same folder or any parent folder of the css/scss files.

Is there a way to make atom-stylefmt work the same way?

3.1.2 only works

tried latest 2 versions (3.2.1 and 3.2.0) and it's not working for me.
only version 3.1.2 works fine
my .stylelintrc is as simple as :

{
    "extends": "stylelint-config-standard",
    "rules": {
        "indentation": 4,
        "number-leading-zero": null,
        "declaration-empty-line-before": "never",
        "comment-empty-line-before": null,
        "unit-whitelist": [
            "px",
            "em",
            "rem",
            "s",
            "%",
            "deg",
            "ms"
        ]
    }
}

Uncaught Error: ENOENT: no such file or directory, open '.editorconfig'

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.0.11
System: Mac OS X 10.10.5
Thrown From: cssfmt package, v1.0.9

Stack Trace

Uncaught Error: ENOENT: no such file or directory, open '.editorconfig'

At fs.js:519

Error: ENOENT: no such file or directory, open '.editorconfig'
  at Error (native)
  at Object.fs.openSync (fs.js:544:18)
  at Object.module.(anonymous function) [as openSync] (ATOM_SHELL_ASAR.js:118:20)
  at Object.fs.readFileSync (fs.js:396:15)
  at Object.fs.readFileSync (ATOM_SHELL_ASAR.js:369:29)
  at Object.<anonymous> (/Users/Matt/.atom/packages/cssfmt/node_modules/cssfmt/node_modules/editorconfig-indent/index.js:2:23)
  at Module._compile (module.js:452:26)
  at Object.defineProperty.value [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:169:21)
  at Module.load (module.js:347:32)
  at Function.Module._load (module.js:302:12)
  at Module.require (module.js:357:17)
  at require (module.js:376:17)
  at Object.<anonymous> (/Users/Matt/.atom/packages/cssfmt/node_modules/cssfmt/lib/config.js:3:26)
  at Module._compile (module.js:452:26)
  at Object.defineProperty.value [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:169:21)
  at Module.load (module.js:347:32)
  at Function.Module._load (module.js:302:12)
  at Module.require (module.js:357:17)
  at require (module.js:376:17)
  at Object.<anonymous> (/Users/Matt/.atom/packages/cssfmt/node_modules/cssfmt/lib/getIndent.js:4:14)
  at Module._compile (module.js:452:26)
  at Object.defineProperty.value [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:169:21)
  at Module.load (module.js:347:32)
  at Function.Module._load (module.js:302:12)
  at Module.require (module.js:357:17)
  at require (module.js:376:17)
  at Object.<anonymous> (/Users/Matt/.atom/packages/cssfmt/node_modules/cssfmt/lib/formatDecls.js:1:79)
  at Module._compile (module.js:452:26)
  at Object.defineProperty.value [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:169:21)
  at Module.load (module.js:347:32)
  at Function.Module._load (module.js:302:12)
  at Module.require (module.js:357:17)
  at require (module.js:376:17)
  at Object.<anonymous> (/Users/Matt/.atom/packages/cssfmt/node_modules/cssfmt/lib/formatAtRules.js:2:19)
  at Module._compile (module.js:452:26)
  at Object.defineProperty.value [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:169:21)
  at Module.load (module.js:347:32)
  at Function.Module._load (module.js:302:12)
  at Module.require (module.js:357:17)
  at require (module.js:376:17)
  at Object.<anonymous> (/Users/Matt/.atom/packages/cssfmt/node_modules/cssfmt/index.js:4:21)
  at Module._compile (module.js:452:26)
  at Object.defineProperty.value [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:169:21)
  at Module.load (module.js:347:32)
  at Function.Module._load (module.js:302:12)
  at Module.require (module.js:357:17)
  at require (module.js:376:17)
  at Object.<anonymous> (/Users/Matt/.atom/packages/cssfmt/index.js:7:15)
  at Module._compile (module.js:452:26)
  at Object.defineProperty.value [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:169:21)
  at Module.load (module.js:347:32)
  at Function.Module._load (module.js:302:12)
  at Module.require (module.js:357:17)
  at require (module.js:376:17)
  at Package.module.exports.Package.requireMainModule (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:759:34)
  at Package.module.exports.Package.activateConfig (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:261:14)
  at PackageDetailView.module.exports.PackageDetailView.activateConfig (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/settings-view/lib/package-detail-view.js:212:26)
  at PackageDetailView.module.exports.PackageDetailView.completeInitialzation (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/settings-view/lib/package-detail-view.js:156:12)
  at PackageDetailView.module.exports.PackageDetailView.loadPackage (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/settings-view/lib/package-detail-view.js:168:21)
  at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/settings-view/lib/package-detail-view.js:298:17
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
  at PackageManager.module.exports.PackageManager.emitPackageEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/settings-view/lib/package-manager.js:588:27)
  at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/settings-view/lib/package-manager.js:379:26
  at exit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/settings-view/lib/package-manager.js:60:16)
  at triggerExitCallback (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:213:47)
  at ChildProcess.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:235:18)
  at emitTwo (events.js:87:13)
  at ChildProcess.emit (events.js:169:7)
  at Process.ChildProcess._handle.onexit (child_process.js:1057:12)

Commands

  2x -1:22.9.0 editor:newline (atom-text-editor.editor.is-focused)
     -1:12.6.0 core:save (atom-text-editor.editor.is-focused)
     -0:55.5.0 settings-view:install-packages-and-themes (atom-text-editor.editor.is-focused)
     -0:49 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:33.9.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -0:33 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:07.0 core:select-all (atom-text-editor.editor.is-focused)

Config

{
  "core": {}
}

Installed Packages

# User
atom-jsfmt, v0.8.3

# Dev
No dev packages

stylefmt fmts the .stylelintrc file

When I have "Format on Save" enabled, and save my .stylelintrc file (where the grammar is set to Plain Text or JSON), it changes from

{
  "rules": {
    "indentation": 2,
  }
}

to

 {
  "rules": {
    2,: ;
  }
}

I realize this is just stylefmt's behavior when operating on those files, but maybe the editor should check the grammar first before running stylefmt on the file?

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.