All Projects → mysticatea → eslint4b

mysticatea / eslint4b

Licence: MIT license
ESLint which works in browsers.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to eslint4b

Rushstack
Monorepo for tools developed by the Rush Stack community
Stars: ✭ 3,465 (+10400%)
Mutual labels:  build, eslint
website
Personal website and blog built with Next.js, Preact, MDX, Tailwind CSS and hosted on Vercel.
Stars: ✭ 17 (-48.48%)
Mutual labels:  eslint
ngp
New Go Package
Stars: ✭ 22 (-33.33%)
Mutual labels:  build
build
Build system scripts based on GENie (https://github.com/bkaradzic/genie) project generator
Stars: ✭ 30 (-9.09%)
Mutual labels:  build
autosetup
A better, faster autoconf replacement
Stars: ✭ 60 (+81.82%)
Mutual labels:  build
AzDo.VstsDashboard
Provide a simple way to view all Builds and Releases on a single page. The intend was to see what's currently happened into the CI/CD pipeline and provide quick feedback of what's going on.
Stars: ✭ 16 (-51.52%)
Mutual labels:  build
eslint-plugin-disable
Disable ESLint plugins using file path patterns and inline comments
Stars: ✭ 51 (+54.55%)
Mutual labels:  eslint
pexample
Building and packaging Python with Pants and PEX - an annotated example
Stars: ✭ 21 (-36.36%)
Mutual labels:  build
ts-nextjs-tailwind-starter
🔋 Next.js + Tailwind CSS + TypeScript starter packed with useful development features
Stars: ✭ 880 (+2566.67%)
Mutual labels:  eslint
eslint-config-preact
Unopinionated baseline ESLint config for Preact and Preact CLI codebases.
Stars: ✭ 75 (+127.27%)
Mutual labels:  eslint
typescript-nuxtjs-boilerplate
🍱 Nuxt.js with TypeScript and Run with docker and docker-compose 🐶🦄🔥 visit: https://typescript-nuxtjs-boilerplate.netlify.com/example
Stars: ✭ 51 (+54.55%)
Mutual labels:  eslint
React-Redux-Enterprise
A React-Redux boilerplate for enterprise/large scaled web applications
Stars: ✭ 77 (+133.33%)
Mutual labels:  eslint
isomorphic-react-redux-saga-ssr
Isomorphic, React, Redux, Saga, Server Side rendering, Hot Module Reloading, Ducks, Code Splitting
Stars: ✭ 19 (-42.42%)
Mutual labels:  eslint
collections
📝 Collections library made in TypeScript
Stars: ✭ 14 (-57.58%)
Mutual labels:  eslint
eslint-config
ESLint + Prettier setup for VS Code by iJS
Stars: ✭ 51 (+54.55%)
Mutual labels:  eslint
uno-game
🎴 An UNO Game made in Javascript
Stars: ✭ 93 (+181.82%)
Mutual labels:  eslint
react-redux-starter-kit
Get started with React, Redux, Webpack and eslint
Stars: ✭ 29 (-12.12%)
Mutual labels:  eslint
wsjcpp
Yet another... C++ Source Package Manager
Stars: ✭ 18 (-45.45%)
Mutual labels:  build
electron-vue-boilerplate
Simple boilerplate for building Vue app with Electron and Webpack.
Stars: ✭ 53 (+60.61%)
Mutual labels:  eslint
Carbon.Gulp
Carbon/Gulp is a delicious blend of tasks and build tools poured into Gulp to form a full-featured modern asset pipeline for Flow Framework and Neos CMS.
Stars: ✭ 15 (-54.55%)
Mutual labels:  build

eslint4b

npm version Downloads/month Build Status Dependency Status

ESLint which works in browsers.

🏁 Goal

ESLint doesn't support browsers officially, but we can use it similar to the official online demo. This package provides the Linter class which is modified to work in browsers.

  • Eliminate the dependency to fs.
  • Eliminate the dynamic require()s.

This package is kept latest with cron jobs GitHub Actions provide.

💿 Installation

Use npm to install.

npm install eslint4b

📖 Usage

Use a bundler such as Webpack. The eslint4b must be able to be bundled.

const Linter = require("eslint4b") // import Linter from "eslint4b"
const linter = new Linter();

// Verify a code.
// See the official document of the Linter class.
const messages = linter.verify(
    "var foo = 0",
    {
        rules: {
            semi: "error"
        }
    },
    { filename: "foo.js" }
);

Also, you can use the Linter class which doesn't include any core rules. It's lightweight than the full set.

// This Linter doesn't include any core rules.
const Linter = require("eslint4b/dist/linter")

// You can load core rules individually.
const { indent, quotes, semi } = require("eslint4b/dist/core-rules")
const linter = new Linter()
linter.defineRule("indent", indent)
linter.defineRule("quotes", quotes)
linter.defineRule("semi", semi)

📰 Changelog

See GitHub releases.

If no description, it's the build of ESLint in the same version. It doesn't have any notable change.

❤️ Contributing

Contributing is welcome.

Please use GitHub issues/PRs.

Development tools

  • npm test runs tests.
  • npm run build build ESLint which works in browsers.
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].