![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
eslint-plugin-logdna
Advanced tools
ESlint plugin containing a collection of rules for enforcing code style at LogDNA
eslint-plugin-logdna
ESlint plugin containing a collection of rules for enforcing code style at LogDNA
Requires eslint also
We do not use peer dependencies, so make sure that eslint
is also installed as a dev dependency.
npm install eslint-plugin-logdna eslint --save-dev
Add logdna
to the plugins section of your ESLint configuration. You can omit
the eslint-plugin-
prefix. Then you can configure the rules you want to use:
{
"plugins": [
"logdna"
],
"rules": {
"logdna/grouped-require": 2,
"logdna/require-file-extension": 2,
"logdna/tap-no-deprecated-aliases": 2,
"logdna/tap-consistent-assertions": [2, {
"preferredMap": {
"error": "error",
"equal": "strictEqual",
}
}]
}
}
logdna/grouped-require
Enforce sorted require declarations within modules
// Bad
const foo = require('./lib/foo.js') //local
const http = require('http') // builtin
require('foo') // static
const logger = require('@logdna/logger') // scoped
const tap = require('tap') // contrib
// Good
require('foo') // static
const http = require('http') // builtin
const tap = require('tap') // contrib
const logger = require('@logdna/logger') // scoped
const foo = require('./lib/foo.js') //local
typeOrder
<Array>
- sort order of require types
(default: ['static', 'builtin', 'contrib', 'scoped', 'local']
)logdna/tap-no-deprecated-aliases
Prevent usage of deprecated tap aliases (>= tap@15.0.0)
Tap deprecated assertion aliases as of version 15.0.0
.
This rule supersedes logdna/tap-consistent-assertions
and will enforce the use of unaliased
assertion methods.
// Bad
test('foo', async (t) => {
t.is_equal(1, 1)
t.strictEqual(1, 1)
t.identical(1, 1)
})
// Good
test('foo', async (t) => {
t.equal(1, 1)
t.equal(1, 1)
t.equal(1, 1)
})
calleePattern
<String>
- pattern to match for tap's Test
object (default: /^t+$/
)logdna/tap-consistent-assertions
Enforce consistent aliases for tap assertions
// {
// "plugins": [
// "logdna"
// ],
// "rules": {
// "logdna/tap-consistent-assertions": {
// "preferredMap": {
// "equal": "strictEqual"
// }
// }
// }
// }
// Bad
test('foo', async (t) => {
t.is_equal(1, 1)
t.equal(1, 1)
t.identical(1, 1)
})
// Good
test('foo', async (t) => {
t.strictEqual(1, 1)
t.strictEqual(1, 1)
t.strictEqual(1, 1)
})
preferredMap
<Object>
- maps the "primary" assertion method to the preferred aliascalleePattern
<String>
- pattern to match for tap's Test
object (default: /^t+$/
)logdna/require-file-extension
Enforce file extension for local modules/files
// Bad
const foo = require('./lib/foo')
// Good
const foo = require('./lib/foo.js')
Thanks goes to these wonderful people (emoji key):
Mike Del Tito 💻 📖 |
This project follows the all-contributors specification. Contributions of any kind welcome!
Copyright © LogDNA, released under an MIT license. See the LICENSE file and https://opensource.org/licenses/MIT
Happy Logging!
2.0.1 (2022-09-17)
tap-consistent-assertions
ruletap@15.0.0 deprecated the use of aliases for assertion methods, which invalidates the concept of a "preferred" alias. This adds a separate rule for enforcing the use of unaliased assertion methods. This rule is auto-fixable.
FAQs
ESlint plugin containing a collection of rules for enforcing code style at LogDNA
The npm package eslint-plugin-logdna receives a total of 0 weekly downloads. As such, eslint-plugin-logdna popularity was classified as not popular.
We found that eslint-plugin-logdna demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.