Skip to content

Commit

Permalink
Merge pull request #86 from 0918nobita/svelte
Browse files Browse the repository at this point in the history
Svelte を用いてコードブロックプロセッサを実装し直した
  • Loading branch information
0918nobita authored May 12, 2024
2 parents 91c649a + 7ee7ea7 commit 18c8b29
Show file tree
Hide file tree
Showing 24 changed files with 919 additions and 2,523 deletions.
6 changes: 6 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** @type {import('prettier').Config} */
export default {
plugins: ['prettier-plugin-svelte'],
singleQuote: true,
semi: true,
};
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["svelte.svelte-vscode"]
}
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"svelte.enable-ts-plugin": true,
"[svelte]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
38 changes: 19 additions & 19 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// @ts-check

import eslint from '@eslint/js';
import eslintPluginSvelte from 'eslint-plugin-svelte';
import globals from 'globals';
import svelteParser from 'svelte-eslint-parser';
import tseslint from 'typescript-eslint';

/** @type {import('typescript-eslint').Config} */
export default [
export default tseslint.config(
{
ignores: ['dist'],
},

{
languageOptions: {
globals: {
Expand All @@ -18,31 +18,31 @@ export default [
},
},
},

eslint.configs.recommended,

...tseslint.configs.strictTypeChecked,
...tseslint.configs.stylisticTypeChecked,
{
files: ['**/*.ts'],
languageOptions: {
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname,
extraFileExtensions: ['.svelte'],
},
},
},

{
files: ['**/*.js'],
...tseslint.configs.disableTypeChecked,
},

...tseslint.configs.recommendedTypeChecked.map((config) => ({
...config,
files: ['**/*.ts'],
})),

...tseslint.configs.stylisticTypeChecked.map((config) => ({
...config,
files: ['**/*.ts'],
})),
];
{
files: ['**/*.svelte'],
plugins: {
svelte: eslintPluginSvelte,
},
languageOptions: {
parser: svelteParser,
parserOptions: {
parser: tseslint.parser,
},
},
},
);
Loading

0 comments on commit 18c8b29

Please sign in to comment.