GithubHelp home page GithubHelp logo

isabella232 / linting-and-editorconfig Goto Github PK

View Code? Open in Web Editor NEW

This project forked from phonegap/linting-and-editorconfig

0.0 0.0 0.0 11 KB

Reference repo for eslint (and other linters) as well as editorconfig settings and info

JavaScript 100.00%

linting-and-editorconfig's Introduction

Linting and Editorconfig

Reference repo for eslint (and other linters) as well as editorconfig settings and info

Contains:

  • an example .editorconfig with some reasonable defaults
  • example of "pure" AirBnB JavaScript eslint setup (complete with React)
  • example of a "customised" AirBnB set up based on the above
  • an example .scss-lint.yml with some reasonable defaults for scss-lint
  • an example .stylintrc with some reasonable defaults for stylint
  • an example .markdownlintrc file to configure markdownlint node/ruby

The whys and wherefores

Although we don't want to enforce any kind of "one true way" to code, we would like for any given project to be able to enforce its own coding style choices (tabs, spaces, single quotes, etc).

Linting can also encourage best practices (function names, etc) and even catch some errors nice and early (typos).

Linting and a Suggested JavaScript Baseline

I am proposing AirBnB JavaScript using ESLint as the baseline standard. It is an extensive set of reasonable standards and even covers React and JSX.

Moreover, unlike something like standard or semistandard which are meant to be all-or-nothing bikeshed breakers, AirBnB is just an eslint config that can have any individual rule overridden at a project level.

Examples of "pure" AirBnB and customised AirBnB are in the linting repo.

@garthdb has also added in linting configs for styles and markdown, currently in use by the site.

Editorconfig

EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs. The EditorConfig project consists of a file format for defining coding styles and a collection of text editor plugins that enable editors to read the file format and adhere to defined styles. EditorConfig files are easily readable and they work nicely with version control systems.

Most of the major editors and IDEs can respect editorconfig files that specify things like tabs over spaces, how many spaces, etc. There is also an example of one of these in the repo. Setting one of these up will help others to respect the choices you make wrt these styles.

Git Collaboration Workflow

Also included is a simple CONTRIBUTING.md file with basic collaboration / contribution information.

linting-and-editorconfig's People

Contributors

devgeeks avatar garthdb avatar

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.