Atom Packages Directory

a package directory for a text editor of the 21st Century

Linter Js Tenx by Ricardo Barros

Install with:
    apm install linter-js-tenx
  

linter-js-tenx

js-standard-style

This is a fork from linter-js-standard, but specifically for the team I work with and designed to work with just the js standard style.

Installation

bash apm install linter-js-tenx

Features

Plugin settings

lintMarkdownFiles (default: false)

Lint markdown fenced code blocks.

requireStandardInPackageJson (default: false)

Only lint if the project has opted in to js-standard by declaring standard as (1) a dependency in dependencies or devDependencies, or (2) declaring a top-level standard config block. Allows this plugin to exist along with other linter plugins and be off by default.

Note: This will opt for the package.json located in the project folder.

preferProjectStandard (default: false)

If the parent project includes standard in dependencies or devDependencies, and it is npm installed in the project node_modules, then use that version from the project. If not npm installed, the plugin will log a warning to the atom console (should you wish to debug if the lint errors you are getting are unexpected) and will use the one included in this plugin.

showEslintRules (default: false)

Enable/disable showing the id of the offended eslint rules.

Plugin configuration via package.json

The plugin will respect an extended standard configuration object located inside of your project’s package.json file.

Global variable support

To have the linter not warn about undeclared variables when using global variables, add a globals section to package.json:

json { "standard": { "globals": [ "var1", "var2" ] } }

See: https://github.com/feross/standard#i-use-a-library-that-pollutes-the-global-namespace-how-do-i-prevent-variable-is-not-defined-errors

Use a custom parser

Custom parsers currently supported: - esprima - esprima-fb - babel-eslint

To use a custom parser, extend the standard object in your package.json file:

json { "standard": { "parser": "esprima" } }

Ignore files while linting

To opt to ignore files from linting, extend the standard object in your package.json file with a single glob expression:

json { "standard": { "ignore": "*.spec.js" } }

or an array of glob expressions:

json { "standard": { "ignore": ["*.spec.js", "*.legacy.js"] } }

If the file open in the editor would have normally been linted, but the file path matches one of the glob patterns, it will not be linted.

See: https://github.com/isaacs/minimatch

License

MIT

Rubber Duck Notes

This is the second atom plugin that I’ve worked on and have decided to make rubber duck coding notes to myself. I may remove these notes over time, but for now I’m leaving them here for myself and anyone who may want them.

My dev procedure for working on this plugin:

```bash # These commands are mac-centric, but could be tweaked for other systems

Link this plugin to my atom app, run inside this directory

atom link

Launch atom in dev mode (from terminal)

atom -d

When in dev mode and I’ve made changes to the package, restart atom to

# recognize the changes ctrl-opt-cmd-L ```

Keywords: javascript, standard, linter Suggest keywords
Fork me on GitHub