{"id":19777465,"url":"https://github.com/ilib-js/ilib-lint-common","last_synced_at":"2025-04-30T19:32:32.701Z","repository":{"id":64834470,"uuid":"578338569","full_name":"iLib-js/ilib-lint-common","owner":"iLib-js","description":"Common routines that the plugins will need","archived":false,"fork":false,"pushed_at":"2024-10-24T04:08:14.000Z","size":1107,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-24T21:11:49.679Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iLib-js.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2022-12-14T20:27:20.000Z","updated_at":"2024-10-18T16:57:24.000Z","dependencies_parsed_at":"2023-02-19T04:45:59.204Z","dependency_job_id":"397167e5-929e-4f97-85d5-87f0e4ab2daf","html_url":"https://github.com/iLib-js/ilib-lint-common","commit_stats":{"total_commits":14,"total_committers":2,"mean_commits":7.0,"dds":0.0714285714285714,"last_synced_commit":"62df286575e5cd9ffa066a23f8939269428b1ec3"},"previous_names":["ilib-js/ilib-lint-common","ilib-js/i18nlint-common"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iLib-js%2Filib-lint-common","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iLib-js%2Filib-lint-common/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iLib-js%2Filib-lint-common/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iLib-js%2Filib-lint-common/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iLib-js","download_url":"https://codeload.github.com/iLib-js/ilib-lint-common/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251769507,"owners_count":21640917,"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":[],"created_at":"2024-11-12T05:25:05.691Z","updated_at":"2025-04-30T19:32:32.693Z","avatar_url":"https://github.com/iLib-js.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003e :warning: **Deprecation Notice** :warning:\n\u003e This repository has been deprecated. Please use the corresponding package from the [iLib-js monorepo](https://github.com/iLib-js/ilib-mono) instead.\n\n# ilib-lint-common\n\nCommon ilib-lint routines and classes/interfaces that the ilib-lint plugins\nwill need to implement the plugin functionality.\n\n\n## Installation\n\n```\nnpm install ilib-lint-common\n\nor\n\nyarn add ilib-lint-common\n```\n\nThis package is usually imported by the ilib-lint tool itself or plugins for\nthe ilib-lint tool.\n\n## Full API Docs\n\nSee the [full API docs](https://github.com/ilib-js/ilib-lint-common/docs/ilib-lint-common.md) for more information.\n\n## License\n\nCopyright © 2022-2024, JEDLSoft\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n## Release Notes\n\n### v3.1.0\n\n- added formatOutput() method to the Formatter class\n- added support for updating source files\n    - made sure that SourceFile and IntermediateRepresentation instances are immutable\n    - added the Transformer class to allow transforming the IntermediateRepresentation into a\n      new IntermediateRepresentation. This allows multiple transformations to\n      be applied to the file in sequence, such as filtering out any unwanted content,\n      or adding a comment at the beginning of the file that tells the user that\n      this is a generated file.\n    - added the Serializer class to serialize the IntermediateRepresentation back into a SourceFile\n    - added Plugin.getTransformers() method to allow plugins to define transformers\n      that can be applied to the IntermediateRepresentation after the Rules are run\n      on it\n    - added Plugin.getSerializers() method to allow plugins to define serializers\n      that can be applied to the IntermediateRepresentation after the Transformers\n      are run on it\n    - added PipelineElement class to ensure that Parser, Transformer, and Serializer\n      classes all have the same interface in terms of names, descriptions, and\n      types.\n\n### v3.0.0\n\n- Update major version because of these breaking changes which need to be\n  updated in the plugins:\n    - Added a SourceFile class to represent the original source file\n      that is being parsed. This gives access to the raw bytes of the file,\n      the file represented as a single string in Unicode, or to the file\n      as an array of lines in Unicode.\n    - Parser constructor no longer takes a filePath argument in the\n      options object. Instead, the parse() method now takes a SourceFile\n      argument. This means that ilib-lint will only create 1 instance of\n      the parser instead of one per source file as it did before. It will\n      then call the parse method multiple times with different source\n      files to produce the intermediate representations of that file\n    - The IntermediateRepresentation constructor no longer takes a filePath\n      argument in the options object as well. Instead, it takes a SourceFile\n      instance, giving the IntermediateRepresentation and any class that\n      uses it access to the original raw content of the file or the\n      representation of the file as a string or an array of lines. This will\n      make it easier for Fixer and Fix instances to operate on the original\n      file and for the Rules to generate the correct snippets of the original\n      file to show where the issue occurred.\n- renamed from i18nlint-common to ilib-lint-common to go along with the name of\n  the tool\n\n### v2.2.1\n\n- changed the documentation for the return value of getRules and getFormatters\n  so that it can be an array of classes or objects that definition declarative\n  rules or formatters. This was already the case, but not documented properly.\n- updated dependencies\n- converted all unit tests from nodeunit to jest\n\n### v2.2.0\n\n- added Fix and Fixer to allow implementing auto-fixing of Results\n\n### v2.1.0\n\n- added the FileStats class\n- added fields to the Result object for the location of the issue\n\n### v2.0.1\n\n- fix a problem where you could not create a Result instance with a\n  lineNumber equal to 0.\n\n### v2.0.0\n\n- added Parser.getType() method\n- clarified some jsdocs\n    - Rule.match() should return a Result instance, an array of\n      Result instances, or undefined if no match\n- added IntermediateRepresentation class to represent the results of\n  parsing a file\n- Parser.parse() should now return the intermediate representation\n    - this requires the plugins to change, so the major version is bumped\n- Added support for logging provided by the lint tool so that plugins\n  can use the linter's logging\n    - getLogger() function passed to the constructors\n\n### v1.4.0\n\n- added utility function withVisibleWhitespace() to visually represent whitespace characters\n- added isKebabCase(), isSnakeCase(), and isCamelCase() utility functions\n\n### v1.3.0\n\n- added getLink() method to the Rule class\n\n### v1.2.0\n\n- update the plugin to return only classes, as the linter may need to instantiate\n  the classes multiple times\n- add the getRuleSets() method to the plugin to allow the plugins to define\n  standard rule sets\n\n### v1.1.0\n\n- added methods to abstract classes needed for loading and testing the plugins\n\n### v1.0.0\n\n- initial version\n- define initial code and default built-in rules\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filib-js%2Filib-lint-common","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filib-js%2Filib-lint-common","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filib-js%2Filib-lint-common/lists"}