{"_id":"stylelint-file-max-lines","name":"stylelint-file-max-lines","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"stylelint-file-max-lines","version":"1.0.0","description":"Limit a maximum number of lines per file","main":"./dist/index.js","scripts":{"test":"vitest run","build":"esbuild ./src/index.js --outfile=./dist/index.js --bundle --minify --platform=node --external:stylelint"},"keywords":["stylelint","stylelint-plugin","max-lines","css","linter"],"author":{"name":"yixiaojiu","url":"https://github.com/yixiaojiu"},"license":"MIT","devDependencies":{"@types/node":"^18.13.0","esbuild":"^0.17.8","prettier":"^2.8.4","stylelint":"^15.1.0","typescript":"^4.9.5","vitest":"^0.28.4"},"peerDependencies":{"stylelint":">=7.0.0"},"repository":{"type":"git","url":"git+https://github.com/yixiaojiu/stylelint-file-max-lines.git"},"bugs":{"url":"https://github.com/yixiaojiu/stylelint-file-max-lines/issues"},"homepage":"https://github.com/yixiaojiu/stylelint-file-max-lines#readme","gitHead":"2cb8334439b312404a00de7bd3c67358884c1300","_id":"stylelint-file-max-lines@1.0.0","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-VS8Ifrsjok1Qk40Cfs/WubuKOOYC4MOFEHiNwB6oGmEySRZBYHFOM1qh0mb6QGl5yFXxJ2mBjYAmfG3FDAP/ig==","shasum":"3e3e39b0cb559359dc781f5101b398e1ae70dc25","tarball":"https://registry.npmjs.org/stylelint-file-max-lines/-/stylelint-file-max-lines-1.0.0.tgz","fileCount":4,"unpackedSize":5134,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA4T+C4qZAmggov36YOjNZwHgP/v22O4sjYgUEyuWAU4AiBv4tI8dfS8tT21/zbnm/gFaA2xl2kQ+kqIS5WNe2VytQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6419ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrCvg//b36bzsv8bvjAQKMh9OuVUdF7ZxediktoiQIpzImGRYokuclk\r\nAYz3dbf6WvNGKwJXuvb1gdLJbk1iTct1Iub6XRY6ZjSogRFUv9MyQcWdiZhD\r\nlZtG6Z3o9HOCRC3sKMHlIYDumP2CuExZvDpjdZo6QWGtTl5f9pGMAllytQK6\r\nOmdIZ4M+32Lq0JqTNs6xQrYe7Yqk4ZTEgDOQobO5D5Os47TzNiIgEsV2txWL\r\ndiaORkNd5izEE6Z9Qei0bDSvxASJFvyEnQh06hY1+ji8TvlRgRQOH8gN1fvZ\r\nYGrvth2Zhd30tqYWBUmVtCGSt9OLnKupuOhyGH1qy7j2ya+7eY9FXF+IjsD7\r\npqlgsTLx0oiyOqp3Cn2MZNGx+/jAyZzvF35FKNzxo7y0oD1kJVVau53qFVX2\r\nfpLK6TUjVFPr1+hJNN+ySk0Den/d6o4EptrqgM2MxQny0ZwoCC94Vk49Dpzk\r\n7Z24WBoI/cZ+qJIrreJvTt405wNgcDW06gq0RMs4eu9dSV3Z2e+uCmFdlpZz\r\nbtTiCHci4VRMvebZeim9RbCIs9iHM52ec29FDsLY3n0vg2NTHOd84bKqa0W1\r\n62mesgX7DBiso8zStK3p0Y9jyQdJRTHimOlhmsfGWghepbR7n4tjgDiXBbf9\r\nrzQlmIAM8uxSn6anqlPEGPrcWP0PK4I9OBg=\r\n=cE47\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"yixiaojiu","email":"1918418506@qq.com"},"directories":{},"maintainers":[{"name":"yixiaojiu","email":"1918418506@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stylelint-file-max-lines_1.0.0_1676381565600_0.8855503137232825"},"_hasShrinkwrap":false}},"time":{"created":"2023-02-14T13:32:45.599Z","1.0.0":"2023-02-14T13:32:45.760Z","modified":"2023-02-14T13:32:46.015Z"},"maintainers":[{"name":"yixiaojiu","email":"1918418506@qq.com"}],"description":"Limit a maximum number of lines per file","homepage":"https://github.com/yixiaojiu/stylelint-file-max-lines#readme","keywords":["stylelint","stylelint-plugin","max-lines","css","linter"],"repository":{"type":"git","url":"git+https://github.com/yixiaojiu/stylelint-file-max-lines.git"},"author":{"name":"yixiaojiu","url":"https://github.com/yixiaojiu"},"bugs":{"url":"https://github.com/yixiaojiu/stylelint-file-max-lines/issues"},"license":"MIT","readme":"# stylelint-file-max-lines\r\n\r\nStylelint rule for limiting a maximum number of lines per file.\r\n\r\nPlease note that most editors show an additional empty line at the end if the file ends with a line break. This plugin does not count that extra line.\r\n\r\n---\r\n\r\nThis plugin is inspired by [eslint max-lines](https://eslint.org/docs/latest/rules/max-lines) and is an enhancement to [dkrnl/stylelint-max-lines](https://github.com/dkrnl/stylelint-max-lines)\r\n\r\n## install\r\n\r\n```sh\r\nnpm i stylelint-file-max-lines -D\r\n```\r\n\r\n## Usage\r\n\r\nAdd this config to your `.stylelintrc`:\r\n\r\n```json\r\n{\r\n  \"plugins\": [\"stylelint-file-max-lines\"],\r\n  \"rules\": {\r\n    \"plugin/file-max-lines\": 300\r\n  }\r\n}\r\n```\r\n\r\n## Options\r\n\r\n`int`: maximum number of lines per file\r\n\r\nFor example, with `5`:\r\n\r\n```json\r\n{\r\n  \"plugins\": [\"stylelint-file-max-lines\"],\r\n  \"rules\": {\r\n    \"plugin/file-max-lines\": 5\r\n  }\r\n}\r\n```\r\n\r\nThe following css file will get an error: `'File has too many lines (6). Maximum allowed is 5 (plugin/file-max-lines)`\r\n\r\n```css\r\nbody {\r\n  border: none;\r\n  margin: 0;\r\n  padding: 0;\r\n  box-sizing: border-box;\r\n}\r\n```\r\n\r\n## Optional secondary options\r\n\r\n`ignore: \"comments\" | \"blankLines\"`\r\n\r\n### Ignore comments\r\n\r\n```json\r\n{\r\n  \"plugins\": [\"stylelint-file-max-lines\"],\r\n  \"rules\": {\r\n    \"plugin/file-max-lines\": [5, { \"ignore\": \"comments\" }]\r\n  }\r\n}\r\n```\r\n\r\nThe following css file are not considered problems\r\n\r\n```css\r\nbody {\r\n  /* border: none; */\r\n  margin: 0;\r\n  padding: 0;\r\n  box-sizing: border-box;\r\n}\r\n```\r\n\r\n### Ignore blankLines\r\n\r\n```json\r\n{\r\n  \"plugins\": [\"stylelint-file-max-lines\"],\r\n  \"rules\": {\r\n    \"plugin/file-max-lines\": [5, { \"ignore\": \"blankLines\" }]\r\n  }\r\n}\r\n```\r\n\r\nThe following css file are not considered problems\r\n\r\n```css\r\nbody {\r\n  margin: 0;\r\n  padding: 0;\r\n\r\n  box-sizing: border-box;\r\n}\r\n```\r\n","readmeFilename":"README.md"}