-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: create a private package for shared eslint configs (#11240)
## Summary - Create a new package in `packages/eslint-config-calcite` that contains shared ESLint configurations for importing in other packages. - Setup the components and design-tokens packages to use the new shared ESLint configs. - Add typescript-eslint coverage to our github scripts - Check css files in lint-staged (previously it was only scss) - Disable [`no-unexpected-newline`](https://archive.eslint.org/docs/6.0.0/rules/no-unexpected-multiline), which [conflicts with prettier](prettier/eslint-config-prettier#32) - Various other cleanup, such as formatting json files in `.vscode/` and removing cspell ignore comments in favor of dictionary additions.. - Run `npm run lint` so unrelated changes don't appear in subsequent PRs
- Loading branch information
Showing
56 changed files
with
323 additions
and
445 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
const cspellPlugin = require("@cspell/eslint-plugin"); | ||
const eslint = require("@eslint/js"); | ||
const globals = require("globals"); | ||
const eslint = require("@eslint/js"); | ||
const tseslint = require("typescript-eslint"); | ||
const cspellPlugin = require("@cspell/eslint-plugin"); | ||
|
||
module.exports = [ | ||
eslint.configs.recommended, | ||
{ | ||
files: ["**/*.{c,m,}js"], | ||
plugins: { "@cspell": cspellPlugin }, | ||
module.exports = tseslint.config({ | ||
files: ["**/*.{c,m,}js"], | ||
extends: [eslint.configs.recommended, tseslint.configs.recommended], | ||
plugins: { "@cspell": cspellPlugin }, | ||
|
||
languageOptions: { | ||
ecmaVersion: 2021, | ||
sourceType: "commonjs", | ||
globals: { | ||
...globals.node, | ||
}, | ||
languageOptions: { | ||
ecmaVersion: 2021, | ||
sourceType: "commonjs", | ||
globals: { | ||
...globals.node, | ||
}, | ||
}, | ||
|
||
rules: { | ||
"comma-dangle": "off", | ||
"@cspell/spellchecker": ["warn", {}], | ||
}, | ||
rules: { | ||
"comma-dangle": "off", | ||
"@cspell/spellchecker": ["warn", {}], | ||
"@typescript-eslint/no-require-imports": "off", | ||
}, | ||
]; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module.exports = { | ||
"*.{json,html,yml}": ["prettier --write"], | ||
"*.scss": ["stylelint --fix", "prettier --write"], | ||
"*.{s,}css": ["stylelint --fix", "prettier --write"], | ||
"*.md": ["prettier --write", "markdownlint --fix"], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.