npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@nextpage/eslint

v1.1.2

Published

Corporate Neutrino preset with NextPage ESLint rules

Downloads

9

Readme

NextPage ESLint Preset

@nextpage/eslint is a Neutrino preset that supports linting projects with ESLint config used in NextPage.

NPM version NPM downloads Build Status

Features

  • React support
  • Vue support
  • Accessibility linting in React and Vue
  • JSON support
  • Markdown code fragments linting
  • other

Installation

npm install --save-dev neutrino eslint @nextpage/eslint

Quickstart

After adding the Atom Space preset to your Neutrino-built project, edit your project's package.json and .neutrinorc.js to add the preset for linting before your build presets. Make it the first in the list of presets

.neutrinorc.js

const eslint = require("@nextpage/eslint");

module.exports = {
   use: [
      eslint()

      // put your rest of presets here
   ]
};

package.json

{
   "scripts": {
      "lint": "eslint ./src --fix",
      "postinstall": "eslint package.json --fix"
   }
}

Create a .eslintrc.js file in the root of the project, containing:

.eslintrc.js

const neutrino = require("neutrino");

module.exports = neutrino().eslintrc();

Preset options

Configuration

If you wish to customize what is included, excluded, or any ESLint options, you can provide an options object with the preset and this will be merged with defaults. Define eslint property to override ESLint configuration.

Example: Include a plugin, browser and Node environments and turn off semicolons from being required as defined by the Atom Space rules.

const eslint = require("@nextpage/eslint");

module.exports = {
   use: [
      eslint({
         eslint: {
            plugins: ["fp"],
            env: {
               browser: true,
               node: true
            },
            rules: {
               semi: "off"
            }
         }
      })
   ]
};

VSCode tips

To enable ESLint in Visual Studio Code you should have the ESLint extension installed.

These are suggested workspace settings related to @nextpage/eslint rules:

.vscode/settings.json

{
   "git.ignoreLimitWarning": true,
   "editor.insertSpaces": true,
   "editor.detectIndentation": true,
   "editor.tabSize": 2,
   "jshint.enable": false,
   "prettier.enable": false,
   "editor.formatOnSave": false,
   "javascript.format.enable": true,
   "javascript.validate.enable": false,
   "files.eol": "\n",
   "files.insertFinalNewline": false,
   "files.autoSave": "onFocusChange",
   "editor.codeActionsOnSave": {
      "source.fixAll.eslint": true
   },
   "eslint.options": {
      "extensions": [".js", ".jsx", ".html", ".md", ".vue", ".json", ".jsonc", ".json5", ".json6"],
      "resolvePluginsRelativeTo": "./node_modules/.pnpm"
   },
   "eslint.validate": ["javascript", "javascriptreact", "html", "markdown", "vue", "json", "jsonc", "json5", "json6"],
   "vetur.validation.template": false
}

When project has been initially installed you need to restart an editor. After this ESLint will start to highlight and auto-fix errors in your code on file save.

Development of this project

Install all dependencies for local development

npm install

To auto-fix all ESLint violations

npm run lint

To show all ESLint errors without fixing

npm test

Release of a new version to NPM

All process is automated on CI/CD you just need to commit your changes and choose how you want to upgrade your version

Major upgrade

Peed dependencies changed, breaking changes in ESLint rules, removing ESLint plugins

npm version major

Minor upgrade

ESLint rules options changes, adding new plugins, removing rules

npm version minor

Patch upgrade

Fixing issues that are expected to work

npm version patch