
Security News
US Government Forces Anthropic to Pull Claude Fable Days After Launch
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.
eslint-plugin-preferred-import-path
Advanced tools
Enforces a consistent use of preferred import paths
Enforce the use of preferred import path, it allows to keep a consistent use of import paths that may be aliased of typescript or webpack and you'd prefer your team to use the aliases, instead of relative paths, or absolute paths but that are longer and aliases keep them short
Fixable: This rule is automatically fixable by using the --fix option on the command line.
This rule checks that import declaration sources are in line with the map of preferred paths.
This rule accepts an argument that conveys the paths you want to map to the preferred paths:
// .eslintrc.js
module.exports = {
rules: {
'preferred-import-path/preferred-import-path': {
'src/views', '@views',
'src/components', '@components',
'src/components/design-system', '@ui'
}
}
}
With this configuration when an import declaration is found it will check if the source of it is one of the keys of the map it will error/warn about the preference of using the value of such key.
For example, if we have this import:
import { Modal } from 'src/components/Modal';
it will autofix to:
import { Modal } from '@components/Modal';
This rule is intended for projects that want to enforce a convention on the use of certain import declarations, most of the time this won't be the case and this rule won't be needed.
FAQs
Enforces a consistent use of preferred import paths
We found that eslint-plugin-preferred-import-path 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
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.

Security News
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.