Giter Site home page Giter Site logo

eslint's Introduction

Shared ESLint config

This repository contains our ESLint config, shared by all JavaScript-based projects.

Usage in a project

The config is available for installation as a public npm package.

Development

Often you'll want to develop this repo by testing how your changes would affect the linting results of another repo.

Assuming you'll want to do that in the frontend repo, and you have this repo checked out next to it, what you'll want to do over in frontend is:

rm -rf node_modules/eslint-plugin-swarmia-dev/ && ln -s ../../eslint/ node_modules/eslint-plugin-swarmia-dev

Finally, you'll need to make sure the eslint working copy has all its dependencies installed locally:

cd node_modules/eslint-plugin-swarmia-dev
npm install

It's best to do this via the new symlink instead of cd ../eslint to ensure the same node version is used in eslint and the repo to be tested.

You can now successfully npm run lint in the frontend repo, while making changes here.

Note that the following methods DO NOT WORK, even if they should be the "official" ways to install local packages:

# Don't do this:
npm install eslint-plugin-swarmia-dev@file:../eslint/
npm install ../eslint

Feel free to improve these instructions if you figure out why.

Developing custom rules

To see how the AST you're matching against looks like, paste your code sample to https://astexplorer.net/ and select either @babel/parser or @typescript-eslint/parser.

Releasing changes

Make sure you've logged-in to NPM (npm login --auth-type=legacy) using the swarmia user before running the commands below.

After a new PR has been merged to master:

./contrib/create-release minor # or "patch" or "major"
./contrib/create-bump-prs

eslint's People

Contributors

jareware avatar ekantola avatar mvakula avatar renovate-bot avatar osqu avatar apkoponen avatar oluwasayo avatar dependabot[bot] avatar swarmiakimmo avatar silppuri avatar renovate[bot] 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.