All Projects โ†’ zbeekman โ†’ EditorConfig-Action

zbeekman / EditorConfig-Action

Licence: MIT license
๐Ÿ”ŽA GitHub Action to check, enforce & fix EditorConfig style violations

Programming Languages

shell
77523 projects
Dockerfile
14818 projects
HCL
1544 projects

Projects that are alternatives of or similar to EditorConfig-Action

elint
A easy way to lint your code
Stars: โœญ 38 (-5%)
Mutual labels:  stylelint, linter
Lint Staged
๐Ÿšซ๐Ÿ’ฉ โ€” Run linters on git staged files
Stars: โœญ 9,492 (+23630%)
Mutual labels:  stylelint, linter
Vscode Stylelint
A Visual Studio Code extension to lint CSS/SCSS/Less with stylelint
Stars: โœญ 260 (+550%)
Mutual labels:  stylelint, linter
figma-plugin-typescript-boilerplate
Figma plugin TypeScript boilerplate to start developing right away
Stars: โœญ 43 (+7.5%)
Mutual labels:  stylelint, editorconfig
lints
Lint all your JavaScript, CSS, HTML, Markdown and Dockerfiles with a single command
Stars: โœญ 14 (-65%)
Mutual labels:  stylelint, linter
vscode-stylelint-plus
A Visual Studio Code extension to lint CSS/SCSS/Less with stylelint, support auto fix on save.
Stars: โœญ 32 (-20%)
Mutual labels:  stylelint, linter
Flake8
The official GitHub mirror of https://gitlab.com/pycqa/flake8
Stars: โœญ 1,112 (+2680%)
Mutual labels:  stylelint, linter
Proselint
A linter for prose.
Stars: โœญ 3,836 (+9490%)
Mutual labels:  linter, style
tryceratops
A linter to prevent exception handling antipatterns in Python (limited only for those who like dinosaurs).
Stars: โœญ 381 (+852.5%)
Mutual labels:  stylelint, linter
spec
๐Ÿฃ easy to use eslint/stylelint/tslint/prettier/...
Stars: โœญ 60 (+50%)
Mutual labels:  stylelint, linter
fe-standard-config-seed
ๅ‰็ซฏ้€š็”จไปฃ็ ่ง„่Œƒ่‡ชๅŠจๅŒ–ๆŽฅๅ…ฅ
Stars: โœญ 18 (-55%)
Mutual labels:  stylelint, editorconfig
Husky.Net
Git hooks made easy with Husky.Net internal task runner! ๐Ÿถ It brings the dev-dependency concept to the .NET world!
Stars: โœญ 394 (+885%)
Mutual labels:  stylelint, linter
sonar-css-plugin
SonarQube CSS / SCSS / Less Analyzer
Stars: โœญ 46 (+15%)
Mutual labels:  stylelint, linter
stylelint-processor-glamorous
๐Ÿ’„ Lint glamorous and related css-in-js with stylelint
Stars: โœญ 18 (-55%)
Mutual labels:  stylelint, linter
Cljstyle
A tool for formatting Clojure code
Stars: โœญ 148 (+270%)
Mutual labels:  linter, style
Stylelint Processor Styled Components
Lint your styled components with stylelint!
Stars: โœญ 639 (+1497.5%)
Mutual labels:  stylelint, linter
standard-packages
List of packages that use `standard`
Stars: โœญ 32 (-20%)
Mutual labels:  linter, style
awesome-react-app
Always the latest version of "create-react-app" with awesome configurations (lint, commit lint, husk, editor config, etc)
Stars: โœญ 44 (+10%)
Mutual labels:  linter, editorconfig
Gulp Stylelint
Gulp plugin for running Stylelint results through various reporters.
Stars: โœญ 149 (+272.5%)
Mutual labels:  stylelint, linter
node-lintspaces
A validator for checking different kinds of whitespaces in your files.
Stars: โœญ 31 (-22.5%)
Mutual labels:  linter, editorconfig

EditorConfig-Action

action on GH marketplace   gpg on keybase.io   GitHub release   package.json deps   GitHub

๐Ÿ”Ž A GitHub Action to check, enforce & fix EditorConfig style violations

blinking octocat squar-heart EditorConfig logo

Table of Contents

Table of Contents

What is EditorConfig?

From the EditorConfig website:

EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs. The EditorConfig project consists of a file format for defining coding styles and a collection of text editor plugins that enable editors to read the file format and adhere to defined styles. EditorConfig files are easily readable and they work nicely with version control systems.

Checkout this project's .editorconfig file here. However, to use this GitHub Action, your project should define your own .editorconfig.

This project uses eclint by Jed Mao (@jedmao) to lint your project. eclint is also released under an MIT license.

Using EditorConfig-Action with Your Project

Visit the EditorConfig-Action GitHub Marketplace page to get started. Use a tagged release or the master version of this GitHub action by creating your own .github/main.workflow file and adding a on = "push" and/or on = "pull_request" workflow that resolves an action uses = zbeekman/EditorConfig-Action[@ref]. Please see [the GitHub Actions documentation] for additional information.

Example Workflows

Check Conformance of Pushed Commits with .editorconfig

To ensure your repository does not violate your project's .editorconfig file, you may use the following workflow:

workflow "PR Audit" {
  on = "pull_request"
  resolves = ["EC Audit PR"]
}

action "EC Audit PR" {
  uses = "zbeekman/[email protected]"
  # secrets = ["GITHUB_TOKEN"] # Will be needed for fixing errors
  env = {
    ALWAYS_LINT_ALL_FILES = "false" # This is the default
  }
}

workflow "Push Audit" {
  on = "push"
  resolves = ["EC Audit Push"]
}

action "EC Audit Push" {
  uses = "zbeekman/[email protected]"
  # secrets = ["GITHUB_TOKEN"] # Will be needed for fixing errors
  env = {
    EC_FIX_ERROR = "false" # not yet implemented
    ALWAYS_LINT_ALL_FILES = "true" # Might be slow for large repos
  }
}

If you omit the ALWAYS_LINT_ALL_FILES variable or it is set to false then only files changed in the pushed commits will be linted. If you explicitly set this to true then every file in the repository will be checked. Depending on the size of the repository, this may be a bad idea.

For protected branches, it is best to set the required action to be the one created with the on = "pull_request", e.g., "EC Audit Push" above, since PRs from forks will not trigger a local push event.

Features and Planed Features

Features currently in development or being considered for addition include:

  • Check only files touched by commits included in the current push
  • Always check all files
  • Pull Request linting (lint all files in pull request) and provide PR status
  • Automatically apply fixes using eclint fix
  • Ability to pass search patterns to git ls-files for enumerating files to check
  • Ability to override project .editorconfig or use without an .editorconfig via eclint's property override flags
  • Pass patterns of files to ignore

EditorConfig Resources

Other GitHub Actions from @zbeekman


star badge   zbeekman gh profile   zbeekman on twitter

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].