Skip to content
/ styles Public

Custom and modern set of rules for eslint and prettier

Notifications You must be signed in to change notification settings

nuremx/styles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nure Styles

Set of modern JS for React and React Native formatting guides, using ESLint and Prettier.

Installing

Install packages

npm install --dev prettier-config-nure eslint-config nure lint-staged husky

Create a .eslintrc.json file with the following contents

{
  "extends": ["eslint-config-nure"]
}

Next create a .prettierrc.js file with the following contents

module.exports = {
  ...require("prettier-config-nure")
};

And finally add the following lines to your package.json file, if you want to ensure no rules are being ignored using lint-staged (optional).

  "name": "My project",
  "version": "0.1.0",
  "scripts": {
    ...
  },
+  "husky": {
+    "hooks": {
+      "pre-commit": "lint-staged"
+    }
+  },
+  "lint-staged": {
+    "*.{js,jsx}": "eslint --fix",
+    "*.{js,jsx,ts,tsx,md,html,css}": "prettier --write"
+  }

Packages

eslint-config-nure

npm

This package includes a ESLint configuration that extends eslint-config-react-app and adds some extra rules

prettier-config-nure

npm

Prettier configuration compatible with eslint-config-nure

License

MIT

About

Custom and modern set of rules for eslint and prettier

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published