Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
eslint-config-kswedberg
Advanced tools
Run the following from the project's root:
npm install eslint-config-kswedberg --save-dev
or:
yarn add eslint-config-kswedberg --dev
Then, add the config to the project's eslint.config.x
or .eslintrc.js
file as described in one of the usage sections below.
@stylistic/eslint
and updates all the formatting rules to use the plugin instead of ESLint core. This is to prepare for ESLint's deprecation of formatting rules.import jsConfig from 'eslint-config-kswedberg/flat/js.mjs';
export default [
...jsConfig,
];
import vueConfig from 'eslint-config-kswedberg/flat/vue.mjs';
export default [
...vueConfig,
];
You can use the Nuxt config in one of two ways…
With @nuxt/eslint
(recommended):
import nuxtConfig from 'eslint-config-kswedberg/flat/nuxt.mjs';
import withNuxt from './.nuxt/eslint.config.mjs';
export default withNuxt(
...nuxtConfig,
// append project-specific configs
// {
//
// }
);
Using this config by itself:
import nuxtConfig from 'eslint-config-kswedberg/flat/nuxt.mjs';
export default [
...nuxtConfig,
];
For the sake of completion, this repo offers configs for browser and node.js globals:
import {browserGlobals, nodeGlobals} from 'eslint-config-kswedberg/flat/globals.mjs';
export default {
browserGlobals,
nodeGlobals,
// other configs
};
For Vue and Nuxt globals, you're probably better off using a separate plugin. Consider @nuxt/eslint
or nuxt-eslint-globals
instead. The ones included in this repo are static lists, so they are prone to become outdated. If you really want to use them, you can do so like this:
// Vue-only globals
import {vueGlobals} from 'eslint-config-kswedberg/flat/globals.mjs';
export default [
vueGlobals,
// other configs
];
// Vue AND Nuxt globals
import {nuxtGlobals} 'eslint-config-kswedberg/flat/globals.mjs'
export default [
nuxtGlobals,
// other configs
];
...rc
file, including JavaScript, JSON, and YAML. You may use any format that eslint supports.For linting with modern ECMAScript (JS) features enabled:
module.exports = {
extends: ['kswedberg']
};
For Vue features, you have a few options for the extends
value:
kswedberg/nuxt3
kswedberg/vue3
kswedberg/vue
eslint-plugin-vue
plugin.@nuxt/eslint-config
as well: ['@nuxt/eslint-config', 'kswedberg/nuxt3']
kswedberg/nuxt3
config adds a number of them to the list of globals
, but it doesn't cover everything, and doesn't attempt to include those created in your project's composables, components, or server/utils directories. For a robust solution to this problem, install the nuxt-eslint-globals
module.If you want React (as well as es6) features enabled, change the extends
value to kswedberg/react
.
You'll need to have eslint-plugin-react
installed.
If your project requires ancient browser compatability, use the es5
config:
module.exports = {
'extends': ['kswedberg/es5']
};
I always forget how to do this, so I'm writing it down as a reminder to me. See more at Configuring ESLint
/* eslint-disable */
/* eslint-enable */
/* eslint-disable no-alert, no-console */
// eslint-disable-line
// eslint-disable-line no-alert, quotes, semi
// eslint-disable-next-line
// eslint-disable-next-line no-alert, quotes, semi
FAQs
A shareable eslint config
The npm package eslint-config-kswedberg receives a total of 17 weekly downloads. As such, eslint-config-kswedberg popularity was classified as not popular.
We found that eslint-config-kswedberg 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
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.