Skip to content

Commit

Permalink
Merge branch 'main' of github.com:gajus/eslint-config-canonical
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Sep 9, 2024
2 parents d9a5da7 + 20ffdad commit 4f34ef5
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 13 deletions.
10 changes: 6 additions & 4 deletions configurations/cypress.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
const cypress = require('eslint-plugin-cypress/flat');

module.exports.recommended = {
// env: {
// 'cypress/globals': true,
// },
languageOptions: {
globals: cypress.recommended.plugins.cypress.environments.globals.globals,
},
plugins: {
cypress: require('eslint-plugin-cypress'),
cypress,
},
rules: {
'cypress/assertion-before-screenshot': 2,
Expand Down
13 changes: 8 additions & 5 deletions configurations/jest.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
const jest = require('eslint-plugin-jest');

module.exports.recommended = {
plugins: [
{
jest: require('eslint-plugin-jest'),
},
],
languageOptions: {
globals: jest.environments.globals.globals,
},
plugins: {
jest,
},
rules: {
'jest/consistent-test-it': 2,
'jest/expect-expect': 2,
Expand Down
7 changes: 6 additions & 1 deletion configurations/jsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ module.exports.recommended = {
'jsdoc/check-param-names': 2,
'jsdoc/check-property-names': 2,
'jsdoc/check-syntax': 2,
'jsdoc/check-tag-names': 2,
'jsdoc/check-tag-names': [
2,
{
definedTags: ['jest-environment', 'jest-environment-options'],
},
],
'jsdoc/check-types': 2,
'jsdoc/check-values': 2,
'jsdoc/empty-tags': 2,
Expand Down
6 changes: 4 additions & 2 deletions configurations/mocha.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const globals = require('globals');

module.exports.recommended = {
env: {
mocha: true,
languageOptions: {
globals: globals.mocha,
},
plugins: {
mocha: require('eslint-plugin-mocha'),
Expand Down
2 changes: 1 addition & 1 deletion configurations/react.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const globals = require('globals');

module.exports.recommended = {
files: ['**/*.tsx'],
files: ['**/*.{jsx,tsx}'],
languageOptions: {
globals: {
...globals.browser,
Expand Down

0 comments on commit 4f34ef5

Please sign in to comment.