![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@akio/eslint-plugin
Advanced tools
ESLint configuration for JavaScript, TypeScript and Angular and some self-written rules
Personal ESLint plugin for JavaScript, TypeScript and Angular with mainly configuration and some self-written rules. Feel free to suggest changes but I'll be keeping my tabs :)
Install via npm:
npm i --save-dev @akio/eslint-plugin
Create your eslint.config.mjs
(Or eslint.config.js
if "type": "module"
is set in your package.json
) file and configure it according to the steps in the Configuration section.
To update this package, follow all the steps of the installation guide again, except configuring the eslint.config.mjs
file.
Put the eslint.config.mjs
file into the root folder of your project.
Some default globals may be given, but they should be configured according to https://eslint.org/docs/latest/use/configure/language-options#predefined-global-variables
eslint.config.mjs
:
import globals from 'globals';
import akiolint from '@akio/eslint-plugin';
export default [
...akiolint.configs.javascript,
{
languageOptions: {
ecmaVersion: 'latest',
globals: {
...globals.browser,
},
},
},
];
eslint.config.mjs
:
import globals from 'globals';
import akiolint from '@akio/eslint-plugin';
export default [
...akiolint.configs.typescript,
{
languageOptions: {
ecmaVersion: 'latest',
globals: {
...globals.browser,
},
},
},
];
eslint.config.mjs
:
import globals from 'globals';
import akiolint from '@akio/eslint-plugin';
export default [
...akiolint.configs.typescript,
...akiolint.configs.angularTypescript,
...akiolint.configs.angularTemplate,
{
languageOptions: {
ecmaVersion: 'latest',
globals: {
...globals.browser,
},
},
},
{
files: [
'**/*.ts',
],
rules: {
'@angular-eslint/component-selector': [
'error',
{
type: 'element',
prefix: /* Replace with prefix for components */,
style: 'kebab-case',
},
],
'@angular-eslint/directive-selector': [
'error',
{
type: 'attribute',
prefix: /* Replace with prefix for components */,
style: 'camelCase',
},
],
},
},
];
ESLint 9 threw everything ESLint 8 did out of the window and basically created a completely different linting infrastructure. All used plugins basically did the same, and so Akiolint was kind of forced to do the same. The easiest way to migrate from V1 is probably to just setup Akiolint again.
To remove Akiolint V1, remove the following things from your package.json
:
update-akiolint
script@akio/eslint-plugin
dependencyeslint
in their name (@angular-eslint/...
, @typescript-eslint/...
, etc.)Also remove all ESLint configuration files (like .eslintrc.json
or .eslintrc.js
) from your project.
Finally remove your package-lock.json
and node_modules
and then run npm i
.
Now you can start with the Installation section above.
FAQs
ESLint configuration for JavaScript, TypeScript and Angular and some self-written rules
We found that @akio/eslint-plugin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
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.