### Installing dependencies with pnpm Source: https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/contributing.md This command installs the project's dependencies using the pnpm package manager. It reads the package.json file in the project root to determine the required dependencies and installs them into the node_modules directory. ```sh pnpm install ``` -------------------------------- ### Complex Negation Transformation Example Source: https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/readme.md This example demonstrates how the plugin transforms a complex negated conjunction into a disjunction of negations, improving code clarity and readability. It shows the original `if` statement and the transformed version. ```JavaScript if (!(a && !b && c >= 10 && d !== e)) { /* ... */ } ``` ```JavaScript if (!a || b || c < 10 || d === e) { /* ... */ } ``` -------------------------------- ### Equivalent Disjunction of Negations Example Source: https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/docs/no-negated-conjunction.md This example shows the equivalent form of the negated conjunction after applying De Morgan's law. The transformation makes the logic explicit by showing that at least one of the conditions must be false. ```javascript if (!a || !b) { /* ... */ } ``` -------------------------------- ### Auto-Fixed Code Example Source: https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/docs/no-negated-conjunction.md This example shows the result of the auto-fix transformation. The negated conjunction has been rewritten as a disjunction of negations, with each operand negated accordingly. ```javascript const foo = !a || b || c < 10 ``` -------------------------------- ### Cloning the repository Source: https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/contributing.md This command clones the ESLint Plugin De Morgan repository from GitHub to your local machine. It uses the git command-line tool and requires you to have Git installed and configured. ```sh git clone git@github.com:azat-io/eslint-plugin-de-morgan.git ``` -------------------------------- ### Negated Disjunction Example Source: https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/docs/no-negated-disjunction.md Demonstrates a negated disjunction that the rule identifies and suggests transforming. ```javascript if (!(a || b)) { /* ... */ } ``` -------------------------------- ### Auto-Fixable Negated Disjunction Source: https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/docs/no-negated-disjunction.md Illustrates an example of a negated disjunction that the rule can automatically fix. ```javascript const foo = !(a || !b || c >= 10) ``` -------------------------------- ### Auto-Fix Transformation Example Source: https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/docs/no-negated-conjunction.md This example demonstrates the auto-fix capability of the rule, which automatically rewrites the code to apply De Morgan's law. The rule transforms a negated conjunction with multiple operands into its equivalent disjunction of negations. ```javascript const foo = !(a && !b && c >= 10) ``` -------------------------------- ### Negated Conjunction Transformation Example Source: https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/docs/no-negated-conjunction.md This example demonstrates how the rule transforms a negated conjunction into a disjunction of negations using De Morgan's law. The rule applies only when the operand of the negation is a pure conjunction (all operands combined with && at the same nesting level). ```javascript if (!(a && b)) { /* ... */ } ``` -------------------------------- ### Running tests with pnpm Source: https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/contributing.md This command executes the project's test suite using the pnpm package manager. It runs the test script defined in the package.json file, which typically uses a testing framework like Jest or Mocha to execute the tests. ```sh pnpm test ``` -------------------------------- ### Legacy Config for ESLint Plugin De Morgan Source: https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/readme.md This code snippet demonstrates how to configure the ESLint plugin De Morgan using the legacy config format (`.eslintrc.js`). It extends the recommended legacy configuration provided by the plugin. ```JavaScript module.exports = { extends: [ 'plugin:de-morgan/recommended-legacy', ], } ``` -------------------------------- ### Flat Config for ESLint Plugin De Morgan Source: https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/readme.md This code snippet shows how to configure the ESLint plugin De Morgan using the flat config format (`eslint.config.js`). It imports the plugin and exports the recommended configuration. ```JavaScript import deMorgan from 'eslint-plugin-de-morgan' export default [ deMorgan.configs.recommended, ] ``` -------------------------------- ### De Morgan's Law Equivalent Source: https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/docs/no-negated-disjunction.md Shows the equivalent form of the negated disjunction after applying De Morgan's law, which the rule suggests as a replacement. ```javascript if (!a && !b) { /* ... */ } ``` -------------------------------- ### Auto-Fixed De Morgan's Law Equivalent Source: https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/docs/no-negated-disjunction.md Shows the result of automatically applying De Morgan's law to the negated disjunction, demonstrating the rule's auto-fix capability. ```javascript const foo = !a && b && c < 10 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.