7.32.0 • Published 3 years ago

eslint4b v7.32.0

Weekly downloads
1,808
License
MIT
Repository
github
Last release
3 years ago

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.
7.32.0

3 years ago

7.31.0

3 years ago

7.30.0

3 years ago

7.29.0

3 years ago

7.28.0

3 years ago

7.25.0

3 years ago

7.27.0

3 years ago

7.26.0

3 years ago

7.24.0

3 years ago

7.23.0

3 years ago

7.22.0

3 years ago

7.21.0

3 years ago

7.20.0

3 years ago

7.19.0

3 years ago

7.18.0

3 years ago

7.17.0

3 years ago

7.16.0

3 years ago

7.15.0

3 years ago

7.14.0

3 years ago

7.13.0

3 years ago

7.12.1

4 years ago

7.12.0

4 years ago

7.11.0

4 years ago

7.10.0

4 years ago

7.9.0

4 years ago

7.8.1

4 years ago

7.8.0

4 years ago

7.7.0

4 years ago

7.6.0

4 years ago

7.5.0

4 years ago

7.4.0

4 years ago

7.3.1

4 years ago

7.3.0

4 years ago

7.2.0

4 years ago

7.1.0

4 years ago

7.0.0

4 years ago

6.8.0

4 years ago

6.7.2

4 years ago

6.7.1

4 years ago

6.7.0

4 years ago

6.6.0

5 years ago

6.5.1

5 years ago

6.3.0

5 years ago

6.2.2

5 years ago

6.1.0

5 years ago

6.0.1

5 years ago

6.0.0

5 years ago

5.16.0

5 years ago

5.15.3

5 years ago

5.15.2

5 years ago

5.15.1

5 years ago

5.15.0

5 years ago

5.14.1

5 years ago

5.14.0

5 years ago

5.13.0

5 years ago

5.12.1

5 years ago

5.12.0

5 years ago

5.11.1

5 years ago

5.11.0

5 years ago

5.10.0

5 years ago

5.9.0

5 years ago

5.8.0

6 years ago

5.7.0

6 years ago

5.6.1

6 years ago

5.6.0

6 years ago

5.5.0

6 years ago

5.4.0

6 years ago

5.3.0

6 years ago

5.2.0

6 years ago

5.1.0

6 years ago

5.0.1

6 years ago

5.0.0

6 years ago

4.19.2

6 years ago

4.19.1-test.2

6 years ago

4.19.1-test.1

6 years ago

4.19.1-test.0

6 years ago

4.19.1

6 years ago

0.0.1

6 years ago

0.0.0

6 years ago