Giter Site home page Giter Site logo

eslint-config-calvium's Introduction

Eslint Config Calvium

Current React Native tested versions from 60.x but it may work in earlier versions too.

eslint

Install

This module can be use in any vanilla JS, React (web) or React Native project as a dev dependency.

npm install @calvium/eslint-config --save-dev

To use this package you MUST install all peer dependencies of this package as devDependencies even if you are not using the relevant configuration

npm install --save-dev eslint eslint-config-prettier @typescript-eslint/eslint-plugin eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-native eslint-plugin-promise eslint-config-prettier @react-native-community/eslint-config eslint-plugin-eslint-comments eslint-plugin-react-hooks eslint-plugin-jest eslint-import-resolver-typescript @typescript-eslint/parser

after that you just need a .eslintrc.js in the same folder than the package.json file with this content

// Calvium React Native Project Default ESLint Settings.
module.exports = {
  "extends": "@calvium/eslint-config/config/{config-name}"
};

Where {config-name} can be one of:

  • react-default
  • react-typescript
  • react-native-default
  • react-native-typescript
  • node-default
  • node-typescript

NOTES

To check the package is working in your installation run:

cd path/to/package.json
./node_modules/.bin/eslint ./path/**

with path being the place where your js code is.

To have this in your IDE in-line:

  • WebStorm/PhpStorm go to:
  - Settings ->
    - Languages & Frameworks ->
      - JavaScript -> 
        - Code Quality Tools ->
          - ESLint -> enable

eslint-config-calvium's People

Contributors

benvium avatar mattvot avatar pablocarrillo avatar richardbarrell-calvium avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

eslint-config-calvium's Issues

Lint for View.propTypes

As View.propTypes is now deprecated and removed from the latest React Native, I suggest we throw an error when View.propTypes is used and suggest ViewPropTypes be used instead.

We see this cause crashes in production builds with no helpful error message.

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.