All Projects β†’ mobify β†’ Mobify Code Style

mobify / Mobify Code Style

πŸ“š Mobify's coding style and standards!

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Mobify Code Style

Gitlint
Linting for your git commit messages
Stars: ✭ 404 (+251.3%)
Mutual labels:  linting
Cfn nag
Linting tool for CloudFormation templates
Stars: ✭ 808 (+602.61%)
Mutual labels:  linting
Bazel Linting System
πŸŒΏπŸ’š Experimental system for registering, configuring, and invoking source-code linters in Bazel.
Stars: ✭ 63 (-45.22%)
Mutual labels:  linting
Vim Lsc
A vim plugin for communicating with a language server
Stars: ✭ 545 (+373.91%)
Mutual labels:  linting
Ktlint Gradle
A ktlint gradle plugin
Stars: ✭ 713 (+520%)
Mutual labels:  linting
Spectral
A flexible JSON/YAML linter for creating automated style guides, with baked in support for OpenAPI v2 & v3.
Stars: ✭ 876 (+661.74%)
Mutual labels:  linting
Eslint Plugin Import
ESLint plugin with rules that help validate proper imports.
Stars: ✭ 3,722 (+3136.52%)
Mutual labels:  linting
Typescript Guidelines
The TypeScript Guidebook
Stars: ✭ 104 (-9.57%)
Mutual labels:  linting
Prettier Standard
Formats with Prettier and lints with ESLint+Standard! (βœΏβ— β€Ώβ— )
Stars: ✭ 801 (+596.52%)
Mutual labels:  linting
Vale
πŸ“ A syntax-aware linter for prose built with speed and extensibility in mind.
Stars: ✭ 978 (+750.43%)
Mutual labels:  linting
Chart Testing
CLI tool for linting and testing Helm charts
Stars: ✭ 571 (+396.52%)
Mutual labels:  linting
Stylelint Processor Styled Components
Lint your styled components with stylelint!
Stars: ✭ 639 (+455.65%)
Mutual labels:  linting
Vscode Crystal Ameba
Ameba extension for Visual Studio Code
Stars: ✭ 20 (-82.61%)
Mutual labels:  linting
Oas Kit
Convert Swagger 2.0 definitions to OpenAPI 3.0 and resolve/validate/lint
Stars: ✭ 516 (+348.7%)
Mutual labels:  linting
Tslint Xo
TSLint shareable config for XO
Stars: ✭ 64 (-44.35%)
Mutual labels:  linting
Gulp Tutorial
Code examples for my Gulp.js tutorial series
Stars: ✭ 383 (+233.04%)
Mutual labels:  linting
App Githooks
Plugin-based system to run specific actions and checks when git hooks are triggered.
Stars: ✭ 5 (-95.65%)
Mutual labels:  linting
Micropy Cli
Micropython Project Management Tool with VSCode support, Linting, Intellisense, Dependency Management, and more!
Stars: ✭ 112 (-2.61%)
Mutual labels:  linting
Cookstyle
A linting tool that helps you to write better Chef Infra cookbooks by detecting and automatically correcting style, syntax, and logic mistakes in your code.
Stars: ✭ 95 (-17.39%)
Mutual labels:  linting
Comby
A tool for structural code search and replace that supports ~every language.
Stars: ✭ 912 (+693.04%)
Mutual labels:  linting

Mobify Code Style

A repo to document code standards for different languages and provide tools for linting Mobify projects.

NPM version CircleCI

JavaScript (ES5) with Grunt

Typically, we lint our javascript files using Grunt and grunt-eslint. grunt-eslint is a Grunt helper for the ESLint linter.

To add javascript linting to your project:

  1. Install the NPM mobify-code-style and grunt-eslint modules.
  2. Create a Gruntfile if you don't have one already.
  3. Create an .eslintrc.yml file in the root of your project directory
  4. In the initConfig of your gruntfile, add a section for eslint pointing to the correct linting file.

The .eslintrc.yml file should contain, to begin with:

extends:
  - './node_modules/mobify-code-style/es5/mobify-es5.yml'

Sample eslint Grunt config:

eslint:{
    dev: {
        src: ['src/**/*.js'],
        options: {
            // When true, eslint will test _only_ the rules set in the provided
            // configuration file
            reset: false,
            configFile: './.eslintrc.yml'
        }
    }
}

Migrating from ESLint 0.x or 1.x to ESlint 2.x or 3.x

If you upgrade the version of grunt-eslint you use from one that pulls in ESLint 1.x or lower to one that pulls in ESLint 2.x or greater, you must modify the configuration files to include the new style of configuration.

If the Grunt config includes the default config ./node_modules/mobify-code-style/javascript/.eslintrc, replace that with ./.eslintrc.yml, and add an .eslintrc.yml to the project root as described above.

If there are modifications to the lint configuration in the project, please check the migration guides at eslint.org to port the modified lint config to ESLint 3.x.

ES6/JSX

We use ESLint to lint ES6 and React/JSX code. If ESLint is installed in a project, we can use the configuration from this module by creating a file in the project root named .eslintrc.yml. If the project does not use JSX, the file contents should be

extends:
  - './node_modules/mobify-code-style/es6/mobify-es6.yml'

and for a React/JSX project:

extends:
  - './node_modules/mobify-code-style/es6/mobify-es6-react.yml'

If using a custom Webpack configuration, add the lines:

settings:
  import/resolver:
    webpack:
      config: '<path-to-webpack-config>'

to the .eslintrc.yml

Make sure to install the following NPM modules:

  • eslint > 3.0
  • eslint-plugin-import
  • eslint-import-resolver-webpack
  • eslint-plugin-react (for React/JSX linting only)

ESLint and Atom

Find out how to integrate ESLint and Atom Text.

CSS

Our Client Services team's CSS Style Guide. Written with a lot of tender care by @kpeatt and @jeffkamo.

Python

See the python directory of this repo for a standardized pylintrc file and instructions on using pep8, pylint and pyflakes to check Python code.

Documentation

See the docs directory for setup and configuration of Markdown linting.

Copyright Headers

All Mobify source files should contain copyright headers at the beginning of the file.

See the copyright directory for setup and configuration of the copyright manager tool

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].