
Research
Using Trusted Protocols Against You: Gmail as a C2 Mechanism
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.
eslint-plugin-qwik
Advanced tools
An Open-Source sub-framework designed with a focus on server-side-rendering, lazy-loading, and styling/animation.
Qwik comes with its own set of ESLint rules to help developers write better code.
Install the plugin:
npm add -D eslint-plugin-qwik
pnpm add -D eslint-plugin-qwik
yarn add -D eslint-plugin-qwik
eslint-plugin-qwik
uses the tsc typechecker to type information. You must include thetsconfigRootDir
in theparserOptions
.
// eslint.config.js
import js from '@eslint/js';
import globals from 'globals';
import tseslint from 'typescript-eslint';
import { qwikEslint9Plugin } from 'eslint-plugin-qwik';
export const qwikConfig = [
js.configs.recommended,
...tseslint.configs.recommended,
{
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
{
files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],
languageOptions: {
globals: {
...globals.serviceworker,
...globals.browser,
...globals.node,
},
},
},
...qwikEslint9Plugin.configs.recommended,
{
ignores: ['node_modules/*', 'dist/*', 'server/*', 'tmp/*'],
},
];
ignores
must always be the last configuration in the array. Note that in shared configs, theignores
must be defined where the config is used, not in the shared config.
eslint < 9
)// .eslintrc.js
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:qwik/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
ecmaVersion: 2021,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
plugins: ['@typescript-eslint'],
};
To ignore files, you must use the
.eslintignore
file.
Rule | Description | Ruleset |
---|---|---|
qwik/valid-lexical-scope | Used the tsc typechecker to detect the capture of unserializable data in dollar ($) scopes. | β π π |
qwik/use-method-usage | Detect invalid use of use hook. | β π |
qwik/no-react-props | Disallow usage of React-specific className/htmlFor props. | β π |
qwik/loader-location | Detect declaration location of loader$ . | βοΈ π |
qwik/prefer-classlist | Enforce using the classlist prop over importing a classnames helper. The classlist prop accepts an object { [class: string]: boolean } just like classnames . | βοΈ π |
qwik/jsx-no-script-url | Disallow javascript: URLs. | βοΈ π |
qwik/jsx-key | Disallow missing key props in iterators/collection literals. | βοΈ π |
qwik/unused-server | Detect unused server$() functions. | β π |
qwik/jsx-img | For performance reasons, always provide width and height attributes for <img> elements, it will help to prevent layout shifts. | βοΈ π |
qwik/jsx-a | For a perfect SEO score, always provide href attribute for <a> elements. | βοΈ π |
qwik/no-use-visible-task | Detect useVisibleTask$() functions. | βοΈ π |
FAQs
An Open-Source sub-framework designed with a focus on server-side-rendering, lazy-loading, and styling/animation.
The npm package eslint-plugin-qwik receives a total of 7,127 weekly downloads. As such, eslint-plugin-qwik popularity was classified as popular.
We found that eslint-plugin-qwik demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 4 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.
Research
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.
Product
We redesigned Socket's first logged-in page to display rich and insightful visualizations about your repositories protected against supply chain threats.
Product
Automatically fix and test dependency updates with socket fixβa new CLI tool that turns CVE alerts into safe, automated upgrades.