GithubHelp home page GithubHelp logo

zaydek / dot-eslintrc.js Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 81 KB

An ESLint configuration, inspired by the delightful gofmt command.

License: MIT License

JavaScript 100.00%
eslint-config gofmt

dot-eslintrc.js's Introduction



.eslintrc.js ๐Ÿงนโœจ




.eslintrc.js formats your JavaScript code for you so you can focus on what matters. Most people think of ESLint as an annoying linter that simply yells at you every time you screw something up. ๐Ÿฅต But did you know of all the rules ESLint supports, just less than 100 can fix your code, too? .eslintrc.js is just such a configuration file to make ESLint extremely useful and productive.

The configuration preferences themselves are heavily inspired by gofmt, the delightful Go language formatter. Each and every rule this configuration uses for auto-formatting was carefully considered. More than that, I myself rely on this configuration file everyday and maintain the preferences as needed.

Installation

All you need to do to get started is the following:

curl https://raw.githubusercontent.com/codex-src/dot-eslintrc.js/master/dot-eslintrc.js > .eslintrc.js

This package is not currently published to NPM.

This downloads the configuration file into the current directory, creating or overwriting .eslintrc.js โ€” ESLint relies on this filename. Assuming your project already uses ESLint, all you need to do is invoke ESLint going forwards with the --fix command. I myself use ESLint-Formatter with Sublime Text 3 to invoke ESLint with a shortcut: โ‡งโŒ˜3.

Create React App users: Good news! ๐Ÿ‘ React already packages ESLint meaning all you need to do is add a package to your editor that invokes ESLint with the --fix command (see example above). Generally, you can toggle auto-formatting on save or for a given shortcut (my personal preference). If nothing happens that usually means something is wrong with your JavaScript and you need to fix your code in order to proceed. This is the same behavior as when using gofmt.

dot-eslintrc.js's People

Contributors

zaydek avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

dot-eslintrc.js's Issues

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.