Skip to content

Latest commit

 

History

History
71 lines (47 loc) · 1.32 KB

README.md

File metadata and controls

71 lines (47 loc) · 1.32 KB

Marstyle

Write code the Martian way (with style)!

MarsBased code linter rules for Ruby and Typescript.

Rubocop install instructions

To add a martian .rubocop.yml into your project, download the file directly from Github executing this script in your Ruby project root folder:

curl https://raw.githubusercontent.com/MarsBased/marstyle/master/ruby/.rubocop.yml > .rubocop.yml

ESLint install instructions

Install the dependency

npm i @marsbased/eslint-config-marsbased --save-dev

Import the rules in your .eslintrc file

TypeScript

{
  "extends": ["@marsbased/eslint-config-marsbased"]
}

Angular

{
  "extends": ["@marsbased/eslint-config-marsbased/angular"]
}

React

{
  "extends": ["@marsbased/eslint-config-marsbased/react"]
}

Prettier install instructions

Option 1

You can install it as a dependency

npm i @marsbased/marstyle-prettier --save-dev

Use it from your prettier.config.js file

module.exports = require('@marsbased/marstyle-prettier');

Option 2

To add the prettier configuration file to your project, download the file directly from Github executing this script in your project root folder:

curl https://raw.githubusercontent.com/MarsBased/marstyle/master/prettier/prettier.config.js > prettier.config.js