Skip to content

Commit

Permalink
Remove eslint config package (#6970)
Browse files Browse the repository at this point in the history
# Pull Request

## 📖 Description

Removal of the `@microsoft/eslint-config-fast-dna` package as we reserve the right to change eslint configurations and will not be maintaining a package outside this repository. As such, the configuration options have been moved to the root `.eslintrc`.

### 🎫 Issues

Resolves #6948

## 👩‍💻 Reviewer Notes

The logic has not changed here, we are only moving this package configuration options internal, and I have added "prettier" as an extension as all current packages re-extend it anyway.

## ✅ Checklist

### General

<!--- Review the list and put an x in the boxes that apply. -->

- [x] I have included a change request file using `$ yarn change`
- [ ] I have added tests for my changes.
- [x] I have tested my changes.
- [ ] I have updated the project documentation to reflect my changes.
- [x] I have read the [CONTRIBUTING](https://github.com/microsoft/fast/blob/master/CONTRIBUTING.md) documentation and followed the [standards](/docs/community/code-of-conduct/#our-standards) for this project.
  • Loading branch information
janechu authored May 24, 2024
1 parent 4a282ae commit 00bccd7
Show file tree
Hide file tree
Showing 61 changed files with 254 additions and 322 deletions.
84 changes: 83 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,85 @@
module.exports = {
extends: ["@microsoft/eslint-config-fast-dna", "prettier"],
root: true,
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "import"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
rules: {
"no-unused-vars": "off",
"no-extra-boolean-cast": "off",
"no-empty-function": "off",
"@typescript-eslint/no-empty-function": [
"error",
{ allow: ["asyncMethods", "methods"] },
],
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/typedef": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"max-len": ["error", 140],
"import/order": "error",
"sort-imports": [
"error",
{
ignoreCase: true,
ignoreDeclarationSort: true,
},
],
"comma-dangle": "off",
"@typescript-eslint/no-empty-interface": [
"error",
{
allowSingleExtends: true,
},
],
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/naming-convention": [
"error",
{
selector: "default",
format: ["UPPER_CASE", "camelCase", "PascalCase"],
leadingUnderscore: "allow",
},
{
selector: "property",
format: null, // disable for property names because of our foo__expanded convention for JSS
// TODO: I think we can come up with a regex that ignores variables with __ in them
},
{
selector: "variable",
format: null, // disable for variable names because of our foo__expanded convention for JSS
// TODO: I think we can come up with a regex that ignores variables with __ in them
},
{
selector: "interface",
format: ["PascalCase"],
custom: {
regex: "^I[A-Z]",
match: false,
},
},
],
"@typescript-eslint/no-inferrable-types": "off",
"no-prototype-builtins": "off",
"no-fallthrough": "off",
"no-unexpected-multiline": "off",
"@typescript-eslint/no-unused-vars": ["warn", { args: "none" }],
"@typescript-eslint/no-explicit-any": "off",
},
overrides: [
{
files: ["**/*.js"],
extends: ["eslint:recommended"],
env: {
node: true,
"shared-node-browser": true,
},
rules: {
"@typescript-eslint/no-var-requires": "off",
},
},
],
};
5 changes: 0 additions & 5 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,7 @@ build/ @janechu @nicholasrice @chrisdholt @awentzel

# Package specific owners

# Tooling
/packages/tooling/fast-figma-plugin-msft/ @nicholasrice @bheston @janechu

# Utilities
/packages/utilities/fast-animation/ @nicholasrice @chrisdholt
/packages/utilities/fast-eslint-rules/ @nicholasrice @janechu @chrisdholt
/packages/utilities/fast-web-utilities/ @janechu @chrisdholt @nicholasrice

# Web components
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Remove eslint config package",
"packageName": "@microsoft/fast-element",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Remove eslint config package",
"packageName": "@microsoft/fast-foundation",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Remove eslint config package",
"packageName": "@microsoft/fast-router",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Remove eslint config package",
"packageName": "@microsoft/fast-ssr",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Remove eslint config package",
"packageName": "@microsoft/fast-web-utilities",
"email": "[email protected]",
"dependentChangeType": "none"
}
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,15 @@
"@types/jest": "^25.2.1",
"@types/lodash-es": "^4.17.4",
"@types/node": "^15.0.1",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
"beachball": "^2.31.2",
"chalk": "^2.4.2",
"copyfiles": "^2.4.1",
"docusaurus-init": "^1.11.0",
"dotenv": "^6.0.0",
"eslint": "^8.0.0",
"eslint-plugin-import": "^2.25.0",
"glob": "^7.1.2",
"husky": "^4.2.5",
"jest-mock": "29.5.0",
Expand Down
84 changes: 0 additions & 84 deletions packages/utilities/fast-eslint-rules/.eslintrc.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/utilities/fast-eslint-rules/.npmrc

This file was deleted.

56 changes: 0 additions & 56 deletions packages/utilities/fast-eslint-rules/CHANGELOG.json

This file was deleted.

55 changes: 0 additions & 55 deletions packages/utilities/fast-eslint-rules/CHANGELOG.md

This file was deleted.

24 changes: 0 additions & 24 deletions packages/utilities/fast-eslint-rules/README.md

This file was deleted.

Loading

0 comments on commit 00bccd7

Please sign in to comment.