{"id":15198410,"url":"https://github.com/meteorlxy/eslint-plugin-prettier-vue","last_synced_at":"2025-04-04T08:07:02.375Z","repository":{"id":35046044,"uuid":"199881098","full_name":"meteorlxy/eslint-plugin-prettier-vue","owner":"meteorlxy","description":":ok_hand: ESLint plugin for Prettier formatting, which is better for Vue SFC","archived":false,"fork":false,"pushed_at":"2023-10-17T12:59:13.000Z","size":540,"stargazers_count":118,"open_issues_count":4,"forks_count":9,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-28T07:05:49.174Z","etag":null,"topics":["eslint","eslint-plugin","eslint-plugin-prettier","eslint-plugin-vue","prettier","vue"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meteorlxy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-07-31T15:18:51.000Z","updated_at":"2025-01-05T07:12:08.000Z","dependencies_parsed_at":"2024-03-02T05:44:43.451Z","dependency_job_id":null,"html_url":"https://github.com/meteorlxy/eslint-plugin-prettier-vue","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meteorlxy%2Feslint-plugin-prettier-vue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meteorlxy%2Feslint-plugin-prettier-vue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meteorlxy%2Feslint-plugin-prettier-vue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meteorlxy%2Feslint-plugin-prettier-vue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meteorlxy","download_url":"https://codeload.github.com/meteorlxy/eslint-plugin-prettier-vue/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247142049,"owners_count":20890652,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eslint","eslint-plugin","eslint-plugin-prettier","eslint-plugin-vue","prettier","vue"],"created_at":"2024-09-28T01:06:11.716Z","updated_at":"2025-04-04T08:07:02.358Z","avatar_url":"https://github.com/meteorlxy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eslint-plugin-prettier-vue\n\n[![npm](https://img.shields.io/npm/v/eslint-plugin-prettier-vue)](https://www.npmjs.com/package/eslint-plugin-prettier-vue)\n[![prettier](https://img.shields.io/badge/code%20style-prettier-blue)](https://github.com/prettier/prettier)\n[![GitHub](https://img.shields.io/github/license/meteorlxy/eslint-plugin-prettier-vue)](https://github.com/meteorlxy/eslint-plugin-prettier-vue/blob/main/LICENSE)\n\n\u003e Make prettier works better on Vue SFC\n\n- Includes all functions of [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier).\n- Provides the ability for `prettier` to process [custom blocks](https://vue-loader.vuejs.org/guide/custom-blocks.html) of Vue SFCs.\n- Options to disable `prettier` for `\u003ctemplate\u003e`, `\u003cscript\u003e` or `\u003cstyle\u003e` blocks of Vue SFCs.\n\n## Demo\n\nPrettier custom blocks:\n\n![demo](https://user-images.githubusercontent.com/18205362/63491748-9a33fb00-c4ea-11e9-9f2e-cdb9b1dab8f1.gif)\n\n## Usage\n\n### Installation\n\n```sh\nnpm install --save-dev \\\n  eslint-plugin-prettier-vue \\\n  eslint-plugin-vue \\\n  eslint-config-prettier \\\n  eslint \\\n  prettier\n```\n\n### ESLint Config\n\n**DO NOT** use `eslint-plugin-prettier` together. This plugin includes all functionalities of `eslint-plugin-prettier` so you do not need it.\n\n```js\n// .eslintrc.js\nmodule.exports = {\n  extends: ['plugin:vue/recommended', 'plugin:prettier-vue/recommended'],\n\n  settings: {\n    'prettier-vue': {\n      // Settings for how to process Vue SFC Blocks\n      SFCBlocks: {\n        /**\n         * Use prettier to process `\u003ctemplate\u003e` blocks or not\n         *\n         * If set to `false`, you may need to enable those vue rules that are disabled by `eslint-config-prettier`,\n         * because you need them to lint `\u003ctemplate\u003e` blocks\n         *\n         * @default true\n         */\n        template: true,\n\n        /**\n         * Use prettier to process `\u003cscript\u003e` blocks or not\n         *\n         * If set to `false`, you may need to enable those rules that are disabled by `eslint-config-prettier`,\n         * because you need them to lint `\u003cscript\u003e` blocks\n         *\n         * @default true\n         */\n        script: true,\n\n        /**\n         * Use prettier to process `\u003cstyle\u003e` blocks or not\n         *\n         * @default true\n         */\n        style: true,\n\n        // Settings for how to process custom blocks\n        customBlocks: {\n          // Treat the `\u003cdocs\u003e` block as a `.markdown` file\n          docs: { lang: 'markdown' },\n\n          // Treat the `\u003cconfig\u003e` block as a `.json` file\n          config: { lang: 'json' },\n\n          // Treat the `\u003cmodule\u003e` block as a `.js` file\n          module: { lang: 'js' },\n\n          // Ignore `\u003ccomments\u003e` block (omit it or set it to `false` to ignore the block)\n          comments: false,\n\n          // Other custom blocks that are not listed here will be ignored\n        },\n      },\n\n      // Use prettierrc for prettier options or not (default: `true`)\n      usePrettierrc: true,\n\n      // Set the options for `prettier.getFileInfo`.\n      // @see https://prettier.io/docs/en/api.html#prettiergetfileinfofilepath-options\n      fileInfoOptions: {\n        // Path to ignore file (default: `'.prettierignore'`)\n        // Notice that the ignore file is only used for this plugin\n        ignorePath: '.testignore',\n\n        // Process the files in `node_modules` or not (default: `false`)\n        withNodeModules: false,\n      },\n    },\n  },\n\n  rules: {\n    'prettier-vue/prettier': [\n      'error',\n      {\n        // Override all options of `prettier` here\n        // @see https://prettier.io/docs/en/options.html\n        printWidth: 100,\n        singleQuote: true,\n        semi: false,\n        trailingComma: 'es5',\n      },\n    ],\n  },\n};\n```\n\n## LICENSE\n\n[MIT](https://github.com/meteorlxy/eslint-plugin-prettier-vue/blob/main/LICENSE) \u0026copy; [@meteorlxy](https://github.com/meteorlxy) \u0026 [Contributors](https://github.com/meteorlxy/eslint-plugin-prettier-vue/graphs/contributors)\n\n[MIT](https://github.com/prettier/eslint-plugin-prettier/blob/master/LICENSE.md) \u0026copy; [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeteorlxy%2Feslint-plugin-prettier-vue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeteorlxy%2Feslint-plugin-prettier-vue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeteorlxy%2Feslint-plugin-prettier-vue/lists"}