GitShow/sveltejs/eslint-plugin-svelte3
sveltejs

eslint-plugin-svelte3

An ESLint plugin for Svelte v3 components.

by sveltejs
eslint-pluginsveltejs
Star on GitHubForknpm

JavaScript

371 stars41 forks19 contributorsQuiet · 3y agoSince 2018MIT

Meet the team

See all 19 on GitHub →
Conduitry
Conduitry158 contributions
dummdidumm
dummdidumm13 contributions
benmccann
benmccann2 contributions
Monkatraz
Monkatraz2 contributions
ota-meshi
ota-meshi2 contributions
baseballyama
baseballyama2 contributions
frederikhors
frederikhors2 contributions
bfanger
bfanger1 contribution

Languages

View on GitHub →
JavaScript81%
Svelte18.5%
TypeScript0.5%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

2 of 6 standards met

Community profile →
50
✓README✓License○Contributing○Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Quiet · Last activity 3y ago
See all on GitHub →
bosung90
Force using TypeScript (force lang='ts')OpenIssue

It is far too easy to forget to put . Can we have a feature similar to vue-block-lang https://eslint.vuejs.org/rules/block-lang.html#vue-block-lang

bosung90 · 3y ago
DetachHead
incorrect `any` errors when using `await`/`then` blockOpenIssue

DetachHead · 3y ago

Recent fixes

View closed PRs →
Bjorn-Eric-Abr
Setting for max props per lineClosedIssue

Hello! Are there any plans to implement a setting controlling the maximum number of props per line? Something like the Eslint plugins for React and Vue has? I would really like that 🥇 Anyway, thanks!

Bjorn-Eric-Abr · 1y ago
IgnusG
Indentation removed wrongly with import-sort (causes weird artifacts)ClosedIssue

The automatic re-ordering of imports seems to remove the indentation of the imports. I feel like this is because it sees them as top level inside of the script tag. This causes some of the statements to be distorted (see ), I've noticed the auto-import from the svelte extension for VS Code also places imports to the edge instead of respecting the indent so maybe it's a setting I missed? Input Output: Expected It works correctly without the indentation (if I write the code like this): package.json { "name": "package", "version": "0.0.0", "scripts": { "format:eslint": "eslint --fix --ext ts,svelte src/client", "format:prettier": "prettier-eslint --write '$PWD/'src/client/{.js,.ts,*/.js,*/.ts,*/.svelte}'' }, "devDependencies": { "@tsconfig/svelte": "^1.0.10", "@typescript-eslint/eslint-plugin": "^2.34.0", "@typescript-eslint/parser": "^2.34.0", "eslint": "^7.8.1", "eslint-config-prettier": "^6.11.0", "eslint-import-resolver-webpack": "^0.12.2", "eslint-plugin-import": "^2.22.0", "eslint-plugin-svelte3": "^2.7.3", "prettier": "^2.1.1", "prettier-eslint": "^11.0.0", "prettier-eslint-cli": "^5.0.0", "prettier-plugin-svelte": "^1.2.1", "svelte": "^3.24.1", "svelte-loader": "^2.13.6" }, "dependencies": {} } .eslintrc.js const path = require('path'); module.exports = { parser: "@typescript-eslint/parser", extends: [ "plugin:import/errors", "plugin:import/warnings", "plugin:import/typescript", "plugin:@typescript-eslint/eslint-recommended", "plugin:@typescript-eslint/recommended", "prettier" ], parserOptions: { createDefaultProgram: true, ecmaVersion: 2019, sourceType: "module", }, plugins: [ "@typescript-eslint", "svelte3" ], "rules": { "import/order": ["error", { alphabetize: { order: 'asc', } }], }, globals: { "process": true }, overrides: [ { "files": ["*.svelte"], "processor": "svelte3/svelte3", "rules": { "import/first": 0, "import/no-duplicates": 0, "import/no-mutable-exports": 0, "import/no-unresolved": 0 } } ], settings: { "import/resolver": { "webpack": { config: path.resolve(__dirname, 'webpack.config.js') } } } } I'm kindof new to svelte so my apologies if this works as intended, or if the "svelte" way is to not indent script tags. My prettier-eslint does introduce the indentation though when I run it before .

IgnusG · 2y ago
NicoCevallos
add preprocess featureMergedPR

I started copying the work done by @Conduitry in his/her fork and did some tests to fix it. I created a package to use in the preprocessing returning the AST info for TypeScript and also a test project to show an example of how to use it.

NicoCevallos · 2y ago
Structured data for AI agents

Repository: sveltejs/eslint-plugin-svelte3. Description: An ESLint plugin for Svelte v3 components. Stars: 371, Forks: 41. Primary language: JavaScript. Languages: JavaScript (81%), Svelte (18.5%), TypeScript (0.5%). License: MIT. Topics: eslint-plugin, sveltejs. Open PRs: 3, open issues: 48. Last activity: 3y ago. Community health: 50%. Top contributors: Conduitry, dummdidumm, benmccann, Monkatraz, ota-meshi, baseballyama, frederikhors, bfanger, CherryDT, j3rem1e and others.

·@ofershap

Replace github.com with gitshow.dev